Fix writing ownedgames.json being called too many times