Added config option for debug logging. Logging disabled by default