Improve pathfinding for swarm command and exit if no swarm hostnames found.