datagen.sh now makes correct directory, data are now sorted upon loading