anchor.diff:        END IF
      END IF
   
  -   IF ( InitInp%WAMIT2%DiffQTF /= 0) THEN
  +   IF ( InitInp%WAMIT2%DiffQTFF ) THEN
         TmpExtension = TRIM(Num2LStr(InitInp%WAMIT2%DiffQTF))//'d'
         INQUIRE( file=TRIM(InitInp%WAMIT2%WAMITFile)//'.'//TRIM(TmpExtension), exist=TmpFileExist )
         IF ( .not. TmpFileExist ) THEN
  
positive.code: 
        ! now that it has been established that the input parameters for second order are good, we check to make sure that the WAMIT files actually exist.
        ! Check MnDrift file
     IF ( InitInp%WAMIT2%MnDrift /= 0) THEN
        ! Check if using QTF file types (10d, 11d, 12d) or not (7,8,9)
        IF ( InitInp%WAMIT2%MnDrift <= 9 ) THEN
           TmpExtension = TRIM(Num2LStr(InitInp%WAMIT2%MnDrift))
  
negative.code:    IF ( InitInp%WAMIT2%SumQTF == 0 ) THEN       ! not using SumQTF method
        InitInp%WAMIT2%SumQTFF = .FALSE.
     ELSE IF ( InitInp%WAMIT2%SumQTF == 10 .OR. InitInp%WAMIT2%SumQTF == 11 .OR. InitInp%WAMIT2%SumQTF == 12 ) THEN       ! Valid values for SumQTF
        IF ( InitInp%PotMod /= 1 ) THEN
           CALL SetErrStat( ErrID_warn,'SumQTF can only be used with PotMod==1.  Turning off',ErrStat,ErrMsg,RoutineName)
           InitInp%WAMIT2%SumQTFF = .FALSE.
        ELSE
           InitInp%WAMIT2%SumQTFF = .TRUE.
        ENDIF
     ELSE
        CALL SetErrStat( ErrID_Fatal,'SumQTF can only have values of 0, 10, 11, or 12.',ErrStat,ErrMsg,RoutineName)
        RETURN
  