Basic logging for daemon mode

Add the command-line option --logfile.

Leave daemon mode off.