Try-catch for cleaning exiting from keyboard interrupts