It's a smart idea to catch and re-elevate KeyboardInterrupts, so that you can continue to get rid of the program employing Ctrl-C. Logging is outside the scope on the question, but a good option is logging. Documentation for that sys and traceback modules. Random course can take seed values from https://howtogetfreephone65431.activablog.com/36204599/a-simple-key-for-free-phone-low-income-unveiled