Earlier quoted context omitted.
Thank you. I will look into this.
No problem. Also, please do not ignore errors. They're meant to be handled.
By the way, I'm wondering how I should go through the file line by line with a reader.
I think the most efficient way may be to scan byte by byte from the start (head) or the end (tail), and count until reaching n amount of newlines (or stop if at the end of the file), then print the bytes between the start/end and the nth newline.
How does this sound?