change the way to get a line from a file.