onQuit Callback handler