Check the PID before going on a wild goose chase

If the PID is already being used by a running process, this process becomes very hard to stop, so this checks the PID landscape first.