Yet another tiny declaring is, "place the code earlier mentioned the code that works by using it", Therefore the logging must be close to the top, maybe in \utilities.
The file that truly has the thing just does https://bookmarkshome.com/story3076039/not-known-facts-about-source-files