Read file line by line, synchronously.