rrewrite file