How To Use Fn_Get_File Function While Changing Order Status

I am trying to download/get a file while changing an order status by using fn_get_file function. But it stops or doesn't get file. How to use fn_get_file function while changing order status? Is it possible to download/get any file by using fn_get_file func. ? Or what is the correct way?

What error are you seeing? What is the return value of fn_get_file()? Usually this is caused because the first parameter ($file_path) is invalid.