properly making identity cert and key persistent