rewrite filesystem