Add support for logging to a file.