Added more and better logging.
Added logging into the debug setup as well