added SIGINT handler for graceful shutdown.