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

Log errors for debug purposes.
Add more logs.
Merge pull request #8 from tart/master

Add logs