Fixed a bug where the app was exiting right after start.
Improved the logger.