Rewrite detector