Add exit to agent.sh