fix scanner do not open issue
add init reader function