added debug level logging