Handle all exceptions, log to console and exit with code -1.
Merge pull request #1 from lvernaillen/pr1

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