diff --git a/ssifbridged.cpp b/ssifbridged.cpp
index 2752102..d35f744 100644
--- a/ssifbridged.cpp
+++ b/ssifbridged.cpp
@@ -73,13 +73,13 @@
                 int numberOfReqNotRsp);
     bool initOK() const
     {
-        return !!dev;
+        return dev.is_open();
     }
     void channelAbort(const char* msg, const boost::system::error_code& ec);
     void async_read();
     void processMessage(const boost::system::error_code& ecRd, size_t rlen);
     int showNumOfReqNotRsp();
-    std::unique_ptr<boost::asio::posix::stream_descriptor> dev = nullptr;
+    boost::asio::posix::stream_descriptor dev;
 
   protected:
     std::array<uint8_t, ssifMessageSize> xferBuffer;
@@ -102,8 +102,8 @@
                          std::shared_ptr<sdbusplus::asio::connection>& bus,
                          const std::string& device, bool verbose,
                          int numberOfReqNotRsp) :
-    io(io),
-    bus(bus), verbose(verbose), numberOfReqNotRsp(numberOfReqNotRsp),
+    dev(*io),
+    io(io), bus(bus), verbose(verbose), numberOfReqNotRsp(numberOfReqNotRsp),
     rspTimer(*io)
 {
     std::string devName = devBase;
@@ -124,7 +124,7 @@
     }
     else
     {
-        dev = std::make_unique<boost::asio::posix::stream_descriptor>(*io, fd);
+        dev.assign(fd);
     }
 
     async_read();
@@ -146,7 +146,7 @@
 
 void SsifChannel::async_read()
 {
-    boost::asio::async_read(*dev,
+    boost::asio::async_read(dev,
                             boost::asio::buffer(xferBuffer, xferBuffer.size()),
                             boost::asio::transfer_at_least(2),
                             [this](const boost::system::error_code& ec,
@@ -189,8 +189,8 @@
 
     boost::system::error_code ecWr;
 
-    size_t wlen = boost::asio::write(*(ssifchannel->dev),
-                                     boost::asio::buffer(rsp), ecWr);
+    size_t wlen = boost::asio::write(ssifchannel->dev, boost::asio::buffer(rsp),
+                                     ecWr);
     if (ecWr || wlen != rsp.size())
     {
         msgToLog =
@@ -346,7 +346,7 @@
             log<level::INFO>(msgToLog.c_str());
         }
         boost::system::error_code ecWr;
-        size_t wlen = boost::asio::write(*dev, boost::asio::buffer(rsp), ecWr);
+        size_t wlen = boost::asio::write(dev, boost::asio::buffer(rsp), ecWr);
         if (ecWr || wlen != rsp.size())
         {
             std::string msgToLog =
