use precondition in Config
refactor reader
add checkRead in skip to prevent reading overflow
refactor
refactor
test
formatting