anchor.diff:        
     212 continue
   ! Do conversion and print, add text later?
  -      write (*,*) 'Read record ',n
  -      write (*,*) 'Turn ',ia,'   Particle ',ifipa
  +      write (ounit,*) 'Read record ',n
  +      write (ounit,*) 'Turn ',ia,'   Particle ',ifipa
         errno=dtostr(b,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(c,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(d,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(e,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(f,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(g,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(h,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         errno=dtostr(p,ch1)
  -      write(*,*) ch1
  +      write(ounit,*) ch1
         if(ntwin.eq.2) then
  -        write (*,*) 'Turn ',ia,'   Particle ',ilapa
  +        write (ounit,*) 'Turn ',ia,'   Particle ',ilapa
           errno=dtostr(b,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(c1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(d1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(e1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(f1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(g1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(h1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
           errno=dtostr(p1,ch1)
  -        write(*,*) ch1
  +        write(ounit,*) ch1
         endif
         goto 211
     510 continue
  -      write(*,*) nfile,'FILE CORRUPTED record',n
  +      write(ounit,*) nfile,'FILE CORRUPTED record',n
         goto 550
     511 continue
  -      write(*,*) nfile,'NO HEADER, EMPTY FILE!!!'
  +      write(ounit,*) nfile,'NO HEADER, EMPTY FILE!!!'
         goto 550
     520 continue
  -      write(*,*) nfile,'HEADER CORRUPTED'
  +      write(ounit,*) nfile,'HEADER CORRUPTED'
         goto 550
     530 continue
  -      write(*,*) nfile,'NO DATA'
  +      write(ounit,*) nfile,'NO DATA'
         goto 550
     540 continue
     550 continue
  
positive.code:                write(*,*) " first and last pair inclusive. Expects first number < last number"
                 write(*,*) "The --fname flag can be used to specify the name of the file to read from (max 100 characters)."
                 write(*,*) " If nothing is specified, it defaults to 'fort.190'."
                 stop 1
              end if
           end if
  
negative.code:       nfile=190
        n=0
        open(nfile,file=fname,form='UNFORMATTED',status='OLD')
  
        if (ofoutput .eqv. .TRUE.) then
           open(191,file=ofname,action='WRITE',status='REPLACE')
           ounit = 191
        end if
  
  100   read(nfile,end=511,err=520) sixtit,commen,cdate,ctime,       &
       &progrm,ifipa,ilapa,itopa,icode,numl,qwc(1),qwc(2),qwc(3), clo(1), &
       &clop(1),clo(2),clop(2),clo(3),clop(3), di0(1),dip0(1),di0(2),dip0 &
  