Add check for jex failure to terminate