add debug logs.