Handle all exceptions, log to console and exit with code -1.

I use this tool as a prebuild script in Visual Studio.
Therefore I handle all exceptions, log to console and exit with code -1 (to indicate there was an error and let the build fail). Otherwise the tool crashes.