Replacing a file while preserving the previous version