Check that the process is not running too fast. Closing or killing an app is not instantaneous and sometimes you can find yourself trying to relaunch too soon, before the previous instance has gone away. A simple solution is to introduce a small pause after Terminate. A better solution is to wait in a loop until Is Connected reads False. Also not every app likes to be terminated, and it's better to close some down more gently, like a human would do. Terminate is the same a Task Manager Kill and can be too brutal for some apps.