More reliable way to see if the agent is already running