Add test for log option and remove logging if log: false