anchor.diff:      end if
   
       !Should never reach this point
  -    write(myOutUnit,'(a)') "Control reached an unreachable point?!?"
  +    write(textOutUnit,'(a)') "Control reached an unreachable point?!?"
       stop 1
   
       !Error handling
   410 continue
  -    write(myOutUnit,'(a,i6)') "ERR while opening input file; iostat=",iostat
  +    write(textOutUnit,'(a,i6)') "ERR while opening input file; iostat=",iostat
       stop 1
   
   411 continue
  -    write(myOutUnit,'(a,i6)') "ERR while opening output file; iostat=",iostat
  +    write(textOutUnit,'(a,i6)') "ERR while opening output file; iostat=",iostat
       stop 1
   
   511 continue
  -    write(myOutUnit,'(a,i6)') "END while reading header; iostat=",iostat
  +    write(textOutUnit,'(a,i6)') "END while reading header; iostat=",iostat
       stop 1
   
   520 continue
  -    write(myOutUnit,'(a,i6)') "ERR while reading header; iostat=",iostat
  +    write(textOutUnit,'(a,i6)') "ERR while reading header; iostat=",iostat
       stop 1
   
   530 continue
  
positive.code: 
          ntwin = ilapa-ifipa+1
          if (.not. (ntwin == 1 .or. ntwin == 2)) then
            write(myOutUnit,'(a)' ) "Error when reading header; ifipa=",ifipa, "ilapa=",ilapa,"ntwin=",ntwin
            stop 1
          end if
  
  
negative.code: 
      !Error handling
  510 continue
      write(textOutUnit,'(a,i6)') "ERR while opening file; iostat=",iostat
      stop 1
  511 continue
      write(textOutUnit,'(a,i6)') "END while reading header; iostat=",iostat
      stop 1
  520 continue
      write(textOutUnit,'(a,i6)') "ERR while reading header; iostat=",iostat
      stop 1
    end function numSTFpairs
  
  