I think this should go to the beginning of the file (after the logging import as in other modules)