logging and a bug fix
Merge pull request #17 from dosht/master

logging and a bug fix