anchor.diff:    
     select case(vtk(rf)%f)
     case(ascii,binary,raw)
  -    close(unit=vtk(rf)%u, iostat=E_IO)
  +    inquire(unit=vtk(rf)%u, opened=fopen,iostat=E_IO) 
  +    if(fopen) close(unit=vtk(rf)%u, iostat=E_IO)
     end select
     !---------------------------------------------------------------------------------------------------------------------------------
     end function VTK_END_XML_READ
  
positive.code: 
    case('BINARY')
      vtk(rf)%f = binary
  ! Not implemented
  !    select case(trim(vtk(rf)%topology))
  !      case('RectilinearGrid', 'StructuredGrid', 'UnstructuredGrid')
  !
  !        open(unit=Get_Unit(vtk(rf)%u),file=trim(filename),status='old', &
  !             form='UNFORMATTED',access='STREAM',action='READ', &
  !             iostat=E_IO, position='REWIND')
  !
  !        select case(trim(vtk(rf)%topology))
  !          case('RectilinearGrid', 'StructuredGrid')
  !            ! Get WholeExtent
  !            E_IO = move(inside='VTKFile', to_find=trim(vtk(rf)%topology), repeat=1, cf=rf,buffer=s_buffer)
  !            call get_char(buffer=s_buffer, attrib='WholeExtent', val=aux, E_IO=E_IO)
  !            if(E_IO == 0) then
  !              read(aux,*) rn
  !              if(present(nx1)) nx1 = rn(1)
  !              if(present(nx2)) nx2 = rn(2)
  !              if(present(ny1)) ny1 = rn(3)
  !              if(present(ny2)) ny2 = rn(4)
  !              if(present(nz1)) nz1 = rn(5)
  !              if(present(nz2)) nz2 = rn(6)
  !            endif
  !        end select
  !
  !        ! count the pieces
  !        rewind(unit=vtk(rf)%u, iostat=E_IO)
  !        np = 0
  !        do
  !          E_IO = read_record(s_buffer, cf=rf)
  !          s_buffer = trim(adjustl(Upper_Case(s_buffer)))
  !          if (index(s_buffer, '</'//trim(Upper_Case(vtk(rf)%topology))) > 0) exit !end of ASCII header section found
  !          if (index(s_buffer, '<PIECE') > 0) np = np + 1
  !        enddo
  !
  !    end select
  
    case('RAW')
      vtk(rf)%f = raw
  
negative.code:   integer(I4P)                                 :: E_IO           !< Input/Output inquiring flag: $0$ if IO is done, $> 0$ if IO is not done
    character(len=:), allocatable                :: strng
    integer(I4P)                                 :: pos
    integer(I4P)                                 :: p1,p2,p3
    !---------------------------------------------------------------------------------------------------------------------------------
  
    !---------------------------------------------------------------------------------------------------------------------------------
  