fixed file reading off-by-one