adding logging for raised errors
Merge pull request #86 from creighton/master

added logging for errors