Fix db index date error bug, add debuglog