beginning of debug logging extension