Fixed a small bug crashing the application on close when threading is
disabled
Moved <iostream> out of debug only section on Main.cpp