Added debug logs.