need more testing, but just for the logic of the function, not actual logging in or manipulating the real .config file, which should be MOCKED.