I did some testing on this and thought that I would share the results.
Here is what doesn't work:
Closing a file
Closing all files
Exit Application script step
Swiping up to kill the app or restarting the iPad with at least one file open
Here is what worked:
Closing all files then either killing the app with a swipe up or restarting the iPad.
One more thing that I will test is what happens over an extended period of inactivity.
The implication of this is potentially you could end up with many files in your temp folder if you are not careful. I'm guessing only a small percent of FMGO user close all files and kill the app with a swipe up or restart of their iPad.