I want to modify this function to read files line by line into an array.
Currently this function will read the entire contents of the file into one