Destructor or exit function
I need to call an inline script whenever an OpenSesame experiment is ended or quitted (to save data on a connected data acquisition server). That is, this code should be also called if the experiment is quitted via or via 'pkill -9 opensesame' or if OS crashed. In Python/Expyriment one would do this simply with destructors.
Is there something like a destructor or exit function is OpenSesame?