replace the json extension with tsv and use the with context for the files