I took your advice, and cut out all the extra steps and simply omitted both the text file and the variable naming the files with a direct path to the files themselves (they are in one folder). My previous methods would only allow around 1k images, but by doing this I was maintaining success with closer to 3k images, which is what I needed.
Thanks so much for your continued support, take care!