add and rewrite common files