Changed name sorting file so that it actually works.