Detect file extension on_load and on_activate and create a temp folder. Delete temp folder on_close