using string.Equal to see a more sensible exception
replacing line ending using a catch all regex