Use proper logging.
Merge pull request #469 from drtshock/master

[Fixed] Use proper logging