more resilient stop work script