fixing logging

'logfil' and 'logfile' are different, added some appends for tee