Allow logging to be disabled by setting logPath to false