most recent JSON is now saved to debug folder
Tweaked lots of code to allow long filenames