Revert "Revert "yinjun wu""

This reverts commit 39fa9df6ae5fb88da096402923e7d53a59b2d760.
Revert "existLast flag"

This reverts commit d4915ac3d60ad641caca8313c61fcd3021e019e7.