defined readFile and JSON parsed objects as global rather than local