Register new version only when the file is closed