def check(&block)
      sync
      return false unless @nodes.check

      entries = 0
      res = true
      @progressmeter.start('Checking index structure', @size) do |pm|
        res = @root.check do |k, v|
          pm.update(entries += 1)
          block_given? ? yield(k, v) : true
        end
      end

      unless entries == @size
        PEROBS.log.error "The BTree size (#{@size}) and the number of " +
          "found entries (#{entries}) don't match"
        return false
      end

      res
    end
def check(&block)
      sync
      return false unless @nodes.check

      entries = 0
      res = true
      @progressmeter.start('Checking index structure', @size) do |pm|
        res = @root.check do |k, v|
          pm.update(entries += 1)
          block_given? ? yield(k, v) : true
        end
      end

      unless entries == @size
        PEROBS.log.error "The BTree size (#{@size}) and the number of " +
          "found entries (#{entries}) don't match"
        return false
      end

      res
    end
Check if the tree file contains any errors.
 @return [Boolean] true if no erros were found, false otherwise