Optionally keep a log file.