typo: log_to_both should also output to file.