@Override
  public void close() throws IOException {
    ExceptionUtil.runAllAndRethrowAllExceptions(
      IOException.class,
      () -> new IOException("Failed to close ResizableMappedFile[" + getPagedFileStorage().getFile() + "]"),
      () -> {
        ensureLogicalSizeWritten();
        assert logicalSize == lastWrittenLogicalSize;
        storage.force();
        boolean truncateOnClose = SystemProperties.getBooleanProperty("idea.resizeable.file.truncate.on.close", false);
        if (truncateOnClose && logicalSize < storage.length()) {
          storage.resize(logicalSize);
        }
      },
      storage::close
    );
  }
@Override
  public void close()