add the logging