That was it!!

It works fine now, of course I will be testing it with many more files than the two files and two entities I have now, but I believe you have helped me solve this problem big thanks to you evilSOB and everyone who helped. I'll post a video later of the stuff that I am doing with this code just so you all can see what you helped me do. Excellent. Thank you.