read_text_batches function

Load data from text files in batches