added function to facilitate addition JSON data to file