When rewinding the content to get back the \r\n, need to check inputIndex-2 for the \r