Unregister stream on shutdown
Init and cleanup OpenSSL