Where does the code print out what you show in the post?

If you want endline characters between the lines read from the file so each line will display on a new line, you need to append the endline...