Added shutdown hook for graceful stop.