fixed test case
outputting json to a file