now saves data when there's an uncaught exception, so if there is a crash we shouldn't lose chat history etc.