add tokencheck on generatetext