Gracefully shutdown on interrupt signal