catch keyboard interrupt.