only load keyring if necessary