Added -l option to specify the logfile.
Added -n option to run without need for a terminal.