@Override
  public synchronized void close() throws IOException {
    if (storage.isOpen()) {
      if (dirty) {
        header.fileStatus(HeaderLayout.FILE_STATUS_PROPERLY_CLOSED);
      }
      storage.close();

      //clean all references to mapped ByteBuffers, so it's easier for GC to unmap them:
      segmentsCache.clear();
      header = null;
      bufferSource = null;
    }
  }
@Override
  public synchronized void close()