Can't launch system command line OSX

Hi,
I know that probably it’s a stupid question, but I’m trying to launch system without results…
as test I’m trying to launch a file psd hat I have in my desktop, if I write this it works:

system("open -a /Applications/Adobe\\ Photoshop\\ 2020/Adobe\\ Photoshop\\ 2020.app /Users/experiment/Desktop/Fede\\ Postprodurre.psd");

While if I try to write this It doesn’t work:

String makeWellFormed(String str)
{
    StringArray tokenizedStr;
    String wellFormedStr = "";
    
    tokenizedStr.addTokens(str, " ", "");
    
    for (String token : tokenizedStr)
    {
        if (wellFormedStr == "")
        {
            wellFormedStr = token;
        } else {
            wellFormedStr += "\\ " + token;
        }
    }
    
    return wellFormedStr;
}

void openFile(String filePath, String appPath)
{
    String command = "open -a " + makeWellFormed(appPath) + makeWellFormed(filePath);
    system(command.toRawUTF8());    
}

openFile("/Users/experiment/Desktop/Fede Postprodurre.psd", "/Applications/Adobe Photoshop 2020/Adobe Photoshop 2020.app");