added messages for reasons when main or onUnload is called (fixes #73)