@Override
  public @NotNull ExtendibleHashMap open(@NotNull Path storagePath) throws IOException {
    if (eagerlyCheckFileCompatibility) {
      //Check the crucial file params (file type, impl version, segment size...) _before_ open mmapped storage
      // over it. It could be troubling to unmap & delete file already mapped into memory (especially on Windows),
      // so it pays off to check crucial file parameters eagerly, before the mapping, and either fail or clean
      // the file while it is not mapped yet:
      long size = Files.exists(storagePath) ? Files.size(storagePath) : 0L;
      if (size > 0) {
        checkCrucialFileHeaderParamsEagerly(storagePath);
      }
    }

    MMappedFileStorageFactory mappedStorageFactory = MMappedFileStorageFactory.withDefaults()
      .pageSize(pageSize);
    try {
      return mappedStorageFactory.wrapStorageSafely(
        storagePath,
        mappedStorage -> {
          ExtendibleHashMap map = new ExtendibleHashMap(mappedStorage, segmentSize);
          if (!map.wasProperlyClosed()
              && notClosedProperlyAction != IGNORE_AND_HOPE_FOR_THE_BEST) {
            throw new CorruptedException(
              "Storage [" + storagePath + "] was not closed properly, can't be trusted -- could be corrupted");
          }
          return map;
        }
      );
    }
    catch (CorruptedException e) {
      if (notClosedProperlyAction == DROP_AND_CREATE_EMPTY_MAP) {
        LOG.info("[" + storagePath + "]: map is not closed properly, factory strategy[" + notClosedProperlyAction + "]" +
                 " -> trying to drop & re-create map from 0");

        FileUtil.delete(storagePath);

        return mappedStorageFactory.wrapStorageSafely(
          storagePath,
          mappedStorage -> new ExtendibleHashMap(mappedStorage, segmentSize)
        );
      }
      else {//if (notClosedProperlyAction == FAIL)
        throw e;
      }
    }
  }
@Override
  public @NotNull ExtendibleHashMap open(@NotNull Path storagePath)