#200 handle errors when writing cardinality data