cmd error rewrite