update the file read process to strip new line characters