Migrated check_manifest_and_rename to OCaml