enhance debug logging