Creates JSON file. There's an issue with retrieving no. of hostnames