pki: Handle error immediately after reading root from disk (#7896)