Moved logging to a log module