Add support for OnQuit and remove extra log