added the logging system