Add error handling
Merge pull request #5 from beastafk/add-error-handling

Add error handling