add keyboardinterrupt exception handler