Yes, I am already using try catch, but I still wanted to ask about this. I thought there was a specific action for this in BAS, such as OnApplicationExit, just like ‘OnApplicationStart’.
Try printing ( with log) the command you are trying to execute, run it in a seperate command line to see if it's working properly.
since it's related to input I am suspecting the problem is with the youtube url you are providing