fixed typo that prevents writing logfile