Adds option to enable logging (disabled by default)