Handling Ctrl+C

Handling SIGINT (Ctrl+C) for graceful shutdown.