Add exit code for agent checking script