Use binary search to speedup checkUnload