Add debug logging for buffers.