New error handling logic
Merge pull request #4 from smarterclayton/new_error_handling

Alter the error logic handling