Handle exceptions and keyboardinterrupt