Added support for carriage return when reading files