Fixed a problem with json files being stored with the wrong name