Expanding functionality by writing JSON to file