There should be a logging feature added to replace the runtime errors that slow down the program dramatically. I'm guessing it should be placed at the root of the program in main. Then pass the pointer on and on so any class can access it.