Accounted for carriage returns when reading files line by line.