DeploymentAgent waiting for URL handlers - fix loop and add logging