Rewrite scanner