Changed debug messages into log messages