Implement openFile function, which prints the file contents line by line.