store tty-local data in a json file