read_lines uses a tail to point to the end of the linked