Fix restore script after file rename