Add option for logging to a file.

Useful in daemon mode.