Updated logging and output