Switch to promises for cards.json creation