anchor.diff:        "unit ",fileUnit," already in use"
       flush(crlog)
   #endif
  -    write(lerr,"(a)")"UNITS> ERROR Failed to reposition file '"//trim(fileName)//"'"
  +    write(lerr, "(a,i0,a)") "UNITS> ERROR Failed while repositioning '"//trim(fileName)//"', "//&
  +      "unit ",fileUnit," already in use"
       call prror
     end if
   
     if(newPos /= -1) then
  -    call f_open(unit=fileUnit,file=fileName,formatted=.true.,mode="rw",err=fErr,status="old")
  +    call f_open(unit=fileUnit,file=fileName,formatted=.true.,mode="rw",err=fErr,iostat=iError,status="old")
       if(fErr) goto 10
       filePos = 0
       do j=1,newPos
  
positive.code:     call f_close(fileUnit)
  
      ! Re-open for appending
      call f_open(unit=fileUnit,file=fileName,formatted=.true.,mode="w+",err=fErr,status="old")
      if(fErr) goto 10
  #ifdef CR
      write(crlog,"(2(a,i0))") "UNITS> Sucessfully repositioned '"//trim(fileName)//"': "//&
  
negative.code:     fAction   = "readwrite"
      fPosition = "append"
    case default
      write(lout,"(a)") "UNITS> WARNING Unknown file mode '"//trim(fMode)//"', defaulting to 'r'"
      fMode     = "r"
      fAction   = "read"
      fPosition = "asis"
  