now writes json description of cards to file