example files and writing API results to file