Adding / fixing logging.