fixed logfile output, file reading