Added keyboard interrupt handler for main