fix reading lines from logfile