Adding a conditional clause to make sure that the certificate we are trying to open has actually done so