Updated logging/debugging section