Better exception handling
Merge pull request #9 from ehenneken/error_handling

Better exception handling