change order of wait-for-job-state and check for standalone mode