Recfactored logging after proving that controller.curAppID is the cause of the crash