Alternatively use byLineCopy instead => If you need to retain a copy of every line, use the byLineCopy function instead.

I don't think byLineCopy should be the preferred choice, copying every line is expensive if not needed.