write debug logs to file instead of stderr
Merge pull request #10 from nikicat/master

write debug logs to file instead of stderr