add option -l for logfile