Running with the debugger already started I see the problem is
[baseFileName, startingFolder] = uiputfile('*.*', ...
'Save to', defaultFileName);
Doesn't fill in startingFolder it's still empty if I give a file name with no extension.
I didn't want .ext since I' really just looking for the directory path I don't care about the full file name as it will be changed as there sill be multiple output files placed here with different extensions.
SO... Workaround is to use some dummy extension like .csv or .txt and change it later.
AND even if I get this right by adding an extension isstring() fails since apparently the returned file name string is a char
change ~isstring(...) to ~ischar(...) and it finally works. For an untyped language m sure can be picky!
Still the issue exists and several things should be fixed.