Add toggle for logToFile.