MidiOut device does not exist error in Gig script

I have this in a Gig script

Initialization
var
    SLMK2: String = "MIDIOUT3 (SL)"
    MESSAGE : SysexMessage = #f0 00 20 1a 0e 15 15 00 00 47 49 47 00 f7

    Print("Exists:" + MidiOutDeviceExists (SLMK2)) 
    SendSysexNowToMidiOutDevice(SLMK2, MESSAGE)
End

When it runs, I get this in the Log

Exists:True
Gig (Script Entity: GigScript)  - MidiOut device does not exist: MIDIOUT3 (SL)

So, my output device clearly exists according to the first line in the log.

What could be the reason that it suddenly does not exists, when I want to send a Sysex message to it?

Is that exactly how the device is listed in Options> MIDI Ports > MIDI Output Ports? Is there a space between MIDIOUT3 and (SL) there? Is the device selected for use there?

Can you please post a screenshot of the MidiPort section of the Options dialog

It works now, after restarting my pc. I think the device was blocked by another process.