fix rewriting old files