allow \n or \r\n as newline character