print errors
Merge pull request #12 from worldline/master

Print errors before halting

To make debugging easier we print out any related error messages before we
actually exit.