Created "exceptions" to avoid problems when CTRL-C is pressed.