refactored export function name to saveJSONStringToFile