Is there any way to perform an action on APPLICATION close?