BUG run_job: bitrot in error exit; added test