Fix application shutdown
Removed some debug output