readbatch

readbatch is working need to detect end of file