Adds some missing error handling logic.
Merge pull request #1 from nisaacson/error-handling

Adds some missing error handling logic.