added assert.notnull check for logDebugMethod