Split "reading lines backwards" and "parsing lines with timestamp" into two functions