Changed text mode to ignore line endings.