Script now writes to a json file instead of just spitting it out in
stdout.