Added ability to enable/disable logging code in the module