exit code is the same order of error handling in init
Impl error in resume

init_segment_header returns err.
ht_empty_init returns err.
init_wb_pool is factored out.