anchor.diff:     CALL FAST_CreateCheckpoint_T(t_initial, n_t_global, 1, Turbine, CheckpointRootName, ErrStat, ErrMsg, Unit )
   
         ! transfer Fortran variables to C:      
  -   ErrStat_c = ErrStat
  -   ErrMsg_c  = TRANSFER( TRIM(ErrMsg)//C_NULL_CHAR, ErrMsg_c )
  +   ErrStat_c     = ErrStat
  +   ErrMsg        = TRIM(ErrMsg)//C_NULL_CHAR
  +   ErrMsg_c      = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
   
   
   #ifdef CONSOLE_FILE   
  
positive.code:    
        ! set values for return to OpenFOAM
     ErrStat_c     = ErrStat
     ErrMsg_c      = TRANSFER( TRIM(ErrMsg)//C_NULL_CHAR, ErrMsg_c )
     
                          
  end subroutine FAST_OpFM_Solution0
  
negative.code:       IF (n_t_global == Turbine%p_FAST%n_TMax_m1 + 1) THEN  ! we call update an extra time in Simulink, which we can ignore until the time shift with outputs is solved
           n_t_global = n_t_global + 1
           ErrStat_c = ErrID_None
           ErrMsg = C_NULL_CHAR
           ErrMsg_c = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
        ELSE     
           ErrStat_c = ErrID_Info
           ErrMsg = "Simulation completed."//C_NULL_CHAR
           ErrMsg_c = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
        END IF
        
     ELSE
  