add exception handler for worker.py