Fixing sorting

I broke the file array using sorted, converting to use the json library to sort as it writes the download files.
Removing config stuff.
Debugging the local file processing