rewrite dir name and event