exports to json file