add readIndex to FileIO