Added debug for exitApp()