trying to output modified json to file