fixed problem of run_demos.py not shutting down services if error