Improve error reporting
Merge pull request #11 from macbre/error-reporting

Improve error reporting