Better Error handling
Merge pull request #3 from benlikescode/patch-1

Merge #3