Added graceful exit on keyboard interrupt