Using new logging scheme and moving logging functions into the prelude