Added keyboard interrupt handler