modified the logging system