made logging configurable
made logging configurable