write output to cards.json