Replace print statements with logging using mozlog

@whimboo 
This is to fix #26 
I have changed this. When do we use error and when exception?