Rewrite mock-script