Add error handling for certificate file copying