fix debug config

The debug setting is not actually used in the code. This change sets the default to true (so the loading of optional libraries is logged by default) and then checks settings.debug in the debuggin function.