anchor.diff:     if (allocated(LinData%StateRel_x))    call WrPartialMatrix( LinData%StateRel_x,    Un, p_FAST%OutFmt, 'State_Rel_x' )
      if (allocated(LinData%StateRel_xdot)) call WrPartialMatrix( LinData%StateRel_xdot, Un, p_FAST%OutFmt, 'State_Rel_xdot' )
   
  -   close(un)
  +   close(Un)
  +   Un = -1
      
   END SUBROUTINE WrLinFile_txt_End   
   !----------------------------------------------------------------------------------------------------------------------------------
  
positive.code:    
     ErrStat = ErrID_None
     ErrMsg = ""
  
     
     LinRootName = TRIM(p_FAST%OutFileRoot)//'.'//trim(num2lstr(m_FAST%NextLinTimeIndx))
  
negative.code:       if (allocated(dYdz)) deallocate(dYdz)
        if (allocated(dZdz)) deallocate(dZdz)
        if (allocated(dZdu)) deallocate(dZdu)
        if (allocated(ipiv)) deallocate(ipiv)
        
        if (allocated(dUdu)) deallocate(dUdu)
        if (allocated(dUdy)) deallocate(dUdy)
        
        if (Un > 0) close(Un)
  
     end subroutine cleanup
  END SUBROUTINE FAST_Linearize_OP   
  !----------------------------------------------------------------------------------------------------------------------------------
  