Add global logging functionality and update existing output calls