Trim the newline in streaming mode