Original implementation of get_bkd_reader's raw pointer usage may cause memory leak problem, use shared_ptr to avoid that.