keep lines() with limit from reading an extra line