Added code to convert the line endings to the current os while reading a file.