-added enable/disable logging functionality