LineReader: naive implementation