Made dumping a json file to a string a utility function