Log errors for debug purposes.
Merge pull request #7 from tart/dogar

Log errors for debug purposes.