use pad() instead of add() during flushTermBlock
add non-standard metadata.read()
refactor logic in metadata.read()