added support for visual studio style running ie. not running from command prompt