let tee write the logfile