Log debug messages only if enabled