Check return value
Add scanner and rewriter