Better error handling, fix no-OpenSSL compile