anchor.diff:      !  Connections Section
       !-------------------------------------------------------------------------------------------------
   
  -    CALL ReadCom( UnIn, FileName, 'Connections header', ErrStat, ErrMsg, UnEc )
  -
  -    IF ( ErrStat /= ErrID_None ) THEN
  -       ErrMsg  = ' Failed to read connections header line.'
  -       CALL CleanUp()
  -       RETURN
  -    END IF
  -
  -
  -    CALL ReadVar ( UnIn, FileName, p%NConnects, 'NConnects', 'Number of Connects', ErrStat, ErrMsg, UnEc )
  -
  -    IF ( ErrStat /= ErrID_None ) THEN
  -       ErrMsg  = ' Failed to read NConnects parameter.'
  -       CALL CleanUp()
  -       RETURN
  -    END IF
  +    CALL ReadCom( UnIn, FileName, 'Connections header', ErrStat2, ErrMsg2, UnEc )
  +          CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +          IF ( ErrStat >= AbortErrLev ) THEN
  +             CALL CleanUp()
  +             RETURN
  +          END IF
  +
  +
  +    CALL ReadVar ( UnIn, FileName, p%NConnects, 'NConnects', 'Number of Connects', ErrStat2, ErrMsg2, UnEc )
  +          CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +          IF ( ErrStat >= AbortErrLev ) THEN
  +             CALL CleanUp()
  +             RETURN
  +          END IF
   
   
       ! Table header
       DO I = 1, 2
  -       CALL ReadCom( UnIn, FileName, 'Connects header', ErrStat, ErrMsg, UnEc )
  -
  -       IF ( ErrStat /= ErrID_None ) THEN
  -          ErrMsg  = ' Failed to read Connects table header line.'
  -          CALL CleanUp()
  -          RETURN
  -       END IF
  +       CALL ReadCom( UnIn, FileName, 'Connects header', ErrStat2, ErrMsg2, UnEc )
  +          CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +          IF ( ErrStat >= AbortErrLev ) THEN
  +             CALL CleanUp()
  +             RETURN
  +          END IF
       END DO
   
       ! make sure NConnects is at least two
  
positive.code:    !     CALL ReadCom( UnIn, FileName, 'Outputs header', ErrStat, ErrMsg, UnEc )
  
      ! allocate InitInp%Outliest (to a really big number for now...)
      CALL AllocAry( InitInp%OutList, 1000, "MoorDyn Input File's Outlist", ErrStat, ErrMsg )
      !  CALL CheckError( ErrStat2, ErrMsg2 )
      !  IF ( ErrStat >= AbortErrLev ) RETURN
  
      ! OutList - List of user-requested output channels (-):
      CALL ReadOutputList ( UnIn, FileName, InitInp%OutList, p%NumOuts, 'OutList', "List of user-requested output channels", ErrStat, ErrMsg, UnEc  )     ! Routine in NWTC Subroutine Library
     !   CALL CheckError( ErrStat2, ErrMsg2 )
     !   IF ( ErrStat >= AbortErrLev ) RETURN
      IF ( ErrStat > ErrID_Warn ) THEN
         ErrMsg  = ' Failed to read output list.'
         CALL CleanUp()
         RETURN
      END IF
  
     !print *, 'NumOuts is ', p%NumOuts
     !print *, '  OutList is ', InitInp%OutList(1:p%NumOuts)
  
negative.code:     ! Read any options lines
      !-------------------------------------------------------------------------------------------------
  
      CALL ReadCom( UnIn, FileName, 'Options header', ErrStat2, ErrMsg2, UnEc )
            CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
            IF ( ErrStat >= AbortErrLev ) THEN
               CALL CleanUp()
               RETURN
            END IF
  
       ! loop through any remaining input lines, and use them to set options (overwriting default values in many cases).
       ! doing this manually since I'm not sure that there is a built in subroutine for reading any input value on any line number.
       DO
  
         READ(UnIn,'(A)',IOSTAT=ErrStat2) Line      !read into a line
  
         IF (ErrStat2 == 0) THEN
           IF (( Line(1:3) == '---' ) .OR. ( Line(1:3) == 'END' ) .OR. ( Line(1:3) == 'end' ))  EXIT  ! check if it's the end line
  
           READ(Line,*,IOSTAT=ErrStat2) OptValue, OptString  ! look at first two entries, ignore remaining words in line, which should be comments
         END IF
  
         IF ( ErrStat2 /= 0 ) THEN
            CALL SetErrStat( ErrID_Fatal, 'Failed to read options.', ErrStat, ErrMsg, RoutineName ) ! would be nice to specify which line had the error
            CALL CleanUp()
            RETURN
         END IF
                       
         CALL Conv2UC(OptString)
  
         ! check all possible options types and see if OptString is one of them, in which case set the variable.
  