change read file so that can process windows newline character