Problem with global logging setting
The code logging.basicConfig(format=fstr, level=default_level)
in this line causes a global change of log level and loggers in other modules are affected. This leads to uncontrolled non-wished debug-level logging etc. This call should be replaced with something with local scope.