I saw a `do_rewrite` in bud code somewhere, are you calling the one defined in bud source code?