def close
      @space_list.close if @space_list.is_open?
      @index.close if @index.is_open?

      if @marks
        @marks.erase
        @marks = nil
      end

      if @f
        @f.flush
        @f.flock(File::LOCK_UN)
        @f.fsync
        @f.close
        @f = nil
      end
    end
def close
      @space_list.close if @space_list.is_open?
      @index.close if @index.is_open?

      if @marks
        @marks.erase
        @marks = nil
      end

      if @f
        @f.flush
        @f.flock(File::LOCK_UN)
        @f.fsync
        @f.close
        @f = nil
      end
    end
Close the flat file. This method must be called to ensure that all data
 is really written into the filesystem.