logfile is optional