Moved logging to it's own module.