better logging, including -l <logfile> option