Adjusted download private key and certificates functions.