Preparing files for rewrite.