Read data from a text file line by line into a variable