feat: add a kill handler to worker to allow to run custom code at worker