move the index reading logic out of diskiomanager