diff --git a/extras/libmemif/examples/icmp_responder-epoll/main.c b/extras/libmemif/examples/icmp_responder-epoll/main.c
index 70095dd..02414fa 100644
--- a/extras/libmemif/examples/icmp_responder-epoll/main.c
+++ b/extras/libmemif/examples/icmp_responder-epoll/main.c
@@ -212,7 +212,10 @@
       if (md.link_up_down)
 	printf ("up\n");
       else
-	printf ("down\n");
+	{
+	  printf ("down\n");
+	  printf ("\treason: %s\n", md.error);
+	}
     }
   free (buf);
 }
diff --git a/extras/libmemif/src/libmemif.h b/extras/libmemif/src/libmemif.h
index 32fda2a..1a5be01 100644
--- a/extras/libmemif/src/libmemif.h
+++ b/extras/libmemif/src/libmemif.h
@@ -35,6 +35,7 @@
   MEMIF_ERR_SUCCESS = 0,	/*!< success */
 /* SYSCALL ERRORS */
   MEMIF_ERR_SYSCALL,		/*!< other syscall error */
+  MEMIF_ERR_CONNREFUSED,	/*!< connection refused */
   MEMIF_ERR_ACCES,		/*!< permission denied */
   MEMIF_ERR_NO_FILE,		/*!< file does not exist */
   MEMIF_ERR_FILE_LIMIT,		/*!< system open file limit */
@@ -354,6 +355,7 @@
     @param tx_queues_num - number of transmit queues
     @param rx_queues - struct containing receive queue details
     @param tx_queues - struct containing transmit queue details
+    @param error - error string
     @param link_up_down - 1 = up (connected), 2 = down (disconnected)
 */
 typedef struct
@@ -375,6 +377,7 @@
   memif_queue_details_t *rx_queues;
   memif_queue_details_t *tx_queues;
 
+  uint8_t *error;
   uint8_t link_up_down;		/* 1 = up, 0 = down */
 } memif_details_t;
 /** @} */
diff --git a/extras/libmemif/src/main.c b/extras/libmemif/src/main.c
index 5d8f03a..3382925 100644
--- a/extras/libmemif/src/main.c
+++ b/extras/libmemif/src/main.c
@@ -56,7 +56,7 @@
 /* private structs and functions */
 #include <memif_private.h>
 
-#define ERRLIST_LEN 39
+#define ERRLIST_LEN 40
 #define MAX_ERRBUF_LEN 256
 
 #if __x86_x64__
@@ -75,6 +75,8 @@
   "Success.",
   /* MEMIF_ERR_SYSCALL */
   "Unspecified syscall error (build with -DMEMIF_DBG or make debug).",
+  /* MEMIF_ERR_CONNREFUSED */
+  "Connection refused",
   /* MEMIF_ERR_ACCES */
   "Permission to resoure denied.",
   /* MEMIF_ERR_NO_FILE */
@@ -215,8 +217,12 @@
     return MEMIF_ERR_NOMEM;
 /* connection refused if master does not exist
     this error would spam the user until master was created */
+/*
   if (err_code == ECONNREFUSED)
     return MEMIF_ERR_SUCCESS;
+*/
+  if (err_code == ECONNREFUSED)
+    return MEMIF_ERR_CONNREFUSED;
   if (err_code == EALREADY)
     return MEMIF_ERR_ALREADY;
   if (err_code == EAGAIN)
@@ -609,8 +615,8 @@
   if (conn == NULL)
     return MEMIF_ERR_NOCONN;
   uint8_t num =
-    (conn->args.is_master) ? conn->run_args.num_s2m_rings : conn->run_args.
-    num_m2s_rings;
+    (conn->args.is_master) ? conn->run_args.num_s2m_rings : conn->
+    run_args.num_m2s_rings;
   if (qid >= num)
     return MEMIF_ERR_QID;
 
@@ -945,8 +951,9 @@
 		}
 	      else
 		{
-		  err = memif_syscall_error_handler (errno);
-		  goto error;
+		  strcpy ((char *) conn->remote_disconnect_string,
+			  memif_strerror (memif_syscall_error_handler
+					  (errno)));
 		}
 	    }
 	}
@@ -959,21 +966,20 @@
 	  if (((memif_connection_t *) e->data_struct)->on_interrupt != NULL)
 	    {
 	      num =
-		(((memif_connection_t *) e->data_struct)->args.
-		 is_master) ? ((memif_connection_t *) e->data_struct)->
-		run_args.num_s2m_rings : ((memif_connection_t *) e->
-					  data_struct)->run_args.
-		num_m2s_rings;
+		(((memif_connection_t *) e->data_struct)->
+		 args.is_master) ? ((memif_connection_t *) e->
+				    data_struct)->run_args.
+		num_s2m_rings : ((memif_connection_t *) e->data_struct)->
+		run_args.num_m2s_rings;
 	      for (i = 0; i < num; i++)
 		{
-		  if (((memif_connection_t *) e->data_struct)->rx_queues[i].
-		      int_fd == fd)
+		  if (((memif_connection_t *) e->data_struct)->
+		      rx_queues[i].int_fd == fd)
 		    {
-		      ((memif_connection_t *) e->
-		       data_struct)->on_interrupt ((void *) e->data_struct,
-						   ((memif_connection_t *)
-						    e->data_struct)->
-						   private_ctx, i);
+		      ((memif_connection_t *) e->data_struct)->
+			on_interrupt ((void *) e->data_struct,
+				      ((memif_connection_t *) e->
+				       data_struct)->private_ctx, i);
 		      return MEMIF_ERR_SUCCESS;
 		    }
 		}
@@ -1000,24 +1006,24 @@
 	  if (events & MEMIF_FD_EVENT_READ)
 	    {
 	      err =
-		((memif_connection_t *) e->data_struct)->read_fn (e->
-								  data_struct);
+		((memif_connection_t *) e->data_struct)->
+		read_fn (e->data_struct);
 	      if (err != MEMIF_ERR_SUCCESS)
 		return err;
 	    }
 	  if (events & MEMIF_FD_EVENT_WRITE)
 	    {
 	      err =
-		((memif_connection_t *) e->data_struct)->write_fn (e->
-								   data_struct);
+		((memif_connection_t *) e->data_struct)->
+		write_fn (e->data_struct);
 	      if (err != MEMIF_ERR_SUCCESS)
 		return err;
 	    }
 	  if (events & MEMIF_FD_EVENT_ERROR)
 	    {
 	      err =
-		((memif_connection_t *) e->data_struct)->error_fn (e->
-								   data_struct);
+		((memif_connection_t *) e->data_struct)->
+		error_fn (e->data_struct);
 	      if (err != MEMIF_ERR_SUCCESS)
 		return err;
 	    }
@@ -1134,8 +1140,8 @@
   if (c->tx_queues != NULL)
     {
       num =
-	(c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
-	num_s2m_rings;
+	(c->args.is_master) ? c->run_args.num_m2s_rings : c->
+	run_args.num_s2m_rings;
       for (i = 0; i < num; i++)
 	{
 	  mq = &c->tx_queues[i];
@@ -1155,8 +1161,8 @@
   if (c->rx_queues != NULL)
     {
       num =
-	(c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
-	num_m2s_rings;
+	(c->args.is_master) ? c->run_args.num_s2m_rings : c->
+	run_args.num_m2s_rings;
       for (i = 0; i < num; i++)
 	{
 	  mq = &c->rx_queues[i];
@@ -1396,8 +1402,8 @@
 	(conn->run_args.num_s2m_rings +
 	 conn->run_args.num_m2s_rings) * (sizeof (memif_ring_t) +
 					  sizeof (memif_desc_t) *
-					  (1 << conn->run_args.
-					   log2_ring_size));
+					  (1 << conn->
+					   run_args.log2_ring_size));
     }
 
   r->region_size = (has_buffers == 0) ? r->buffer_offset : r->buffer_offset +
@@ -1572,8 +1578,8 @@
   if (EXPECT_FALSE (c->fd < 0))
     return MEMIF_ERR_DISCONNECTED;
   uint8_t num =
-    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
-    num_s2m_rings;
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->
+    run_args.num_s2m_rings;
   if (EXPECT_FALSE (qid >= num))
     return MEMIF_ERR_QID;
   if (EXPECT_FALSE (!count_out))
@@ -1652,8 +1658,8 @@
   if (EXPECT_FALSE (c->fd < 0))
     return MEMIF_ERR_DISCONNECTED;
   uint8_t num =
-    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
-    num_s2m_rings;
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->
+    run_args.num_s2m_rings;
   if (EXPECT_FALSE (qid >= num))
     return MEMIF_ERR_QID;
   if (EXPECT_FALSE (!count_out))
@@ -1715,8 +1721,8 @@
 		  b0 = (bufs + *count_out);
 		  b0->desc_index = slot;
 		  dst_left =
-		    (c->args.is_master) ? ring->desc[slot & mask].length : c->
-		    run_args.buffer_size;
+		    (c->args.is_master) ? ring->desc[slot & mask].
+		    length : c->run_args.buffer_size;
 		  ring->desc[slot & mask].flags = 0;
 		}
 	      else
@@ -1778,8 +1784,8 @@
   if (EXPECT_FALSE (c->fd < 0))
     return MEMIF_ERR_DISCONNECTED;
   uint8_t num =
-    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
-    num_m2s_rings;
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->
+    run_args.num_m2s_rings;
   if (EXPECT_FALSE (qid >= num))
     return MEMIF_ERR_QID;
   libmemif_main_t *lm = &libmemif_main;
@@ -1832,8 +1838,8 @@
   if (EXPECT_FALSE (c->fd < 0))
     return MEMIF_ERR_DISCONNECTED;
   uint8_t num =
-    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
-    num_s2m_rings;
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->
+    run_args.num_s2m_rings;
   if (EXPECT_FALSE (qid >= num))
     return MEMIF_ERR_QID;
   if (EXPECT_FALSE (!tx))
@@ -1899,8 +1905,8 @@
   if (EXPECT_FALSE (c->fd < 0))
     return MEMIF_ERR_DISCONNECTED;
   uint8_t num =
-    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
-    num_m2s_rings;
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->
+    run_args.num_m2s_rings;
   if (EXPECT_FALSE (qid >= num))
     return MEMIF_ERR_QID;
   if (EXPECT_FALSE (!rx))
@@ -2053,6 +2059,16 @@
   else
     err = MEMIF_ERR_NOBUF_DET;
 
+  l1 = strlen ((char *) c->remote_disconnect_string);
+  if (l0 + l1 < buflen)
+    {
+      md->error =
+	(uint8_t *) strcpy (buf + l0, (char *) c->remote_disconnect_string);
+      l0 += l1 + 1;
+    }
+  else
+    err = MEMIF_ERR_NOBUF_DET;
+
   md->regions_num = c->regions_num;
   l1 = sizeof (memif_region_details_t) * md->regions_num;
   if (l0 + l1 <= buflen)
@@ -2073,8 +2089,8 @@
     }
 
   md->rx_queues_num =
-    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
-    num_m2s_rings;
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->
+    run_args.num_m2s_rings;
 
   l1 = sizeof (memif_queue_details_t) * md->rx_queues_num;
   if (l0 + l1 <= buflen)
@@ -2097,8 +2113,8 @@
     }
 
   md->tx_queues_num =
-    (c->args.is_master) ? c->run_args.num_m2s_rings : c->run_args.
-    num_s2m_rings;
+    (c->args.is_master) ? c->run_args.num_m2s_rings : c->
+    run_args.num_s2m_rings;
 
   l1 = sizeof (memif_queue_details_t) * md->tx_queues_num;
   if (l0 + l1 <= buflen)
@@ -2135,8 +2151,8 @@
   if (c->fd < 0)
     return MEMIF_ERR_DISCONNECTED;
   uint8_t num =
-    (c->args.is_master) ? c->run_args.num_s2m_rings : c->run_args.
-    num_m2s_rings;
+    (c->args.is_master) ? c->run_args.num_s2m_rings : c->
+    run_args.num_m2s_rings;
   if (qid >= num)
     return MEMIF_ERR_QID;
 
