Take care of special case of newlines in the error message and fix call to get
the text of the line for token.