Made the readBinaryValueFile 8x faster

Added the same optimisation to readTextValueFile