Method to store in JSON files