Fix an issue where the log option is not applied properly