added search_stage_next_hit and corpus file initialization code