This seems to be required even with TLSv1.3 support now. Also, while we're here, improve the error handling/output.
file