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