Is it possible to define one or more functions to execute just before a program terminates?