add error handling
log more consistantly
Merge pull request #1 from josephholsten/handle-errors

Handle errors