trying to debug the app exiting