Index: /trunk/Ohana/src/libkapa/src/IOfuncs.c
===================================================================
--- /trunk/Ohana/src/libkapa/src/IOfuncs.c	(revision 18276)
+++ /trunk/Ohana/src/libkapa/src/IOfuncs.c	(revision 18277)
@@ -1,3 +1,4 @@
 # include <kapa_internal.h>
+# define DEBUG 0
 
 /** these function expect to operate with a BLOCKing socket **/
@@ -63,5 +64,8 @@
   status = read (device, buffer, 16);
   buffer[16] = 0;
-  if (status != 16) fprintf (stderr, "dropped message length\n");
+  if (status != 16) {
+      fprintf (stderr, "dropped message length\n");
+  }
+  if (DEBUG) fprintf (stderr, "recv buffer: %s\n", buffer);
 
   /* find the message length, allocate space */
@@ -71,9 +75,11 @@
   /* read Nbytes from the device */
   status = read (device, message, Nbytes);
-  if (status != Nbytes) fprintf (stderr, "Kii/Kapa comm error\n");
+  if (status != Nbytes) {
+      fprintf (stderr, "Kii/Kapa comm error\n");
+  }
   message[status] = 0;
   /* make the string easy to parse */
 
-  // fprintf (stderr, "recv: %s\n", message);
+  if (DEBUG) fprintf (stderr, "recv: %s\n", message);
 
   /* scan the incoming message */
@@ -112,5 +118,5 @@
   write (device, string, length);
 
-  // fprintf (stderr, "send: %s\n", string);
+  if (DEBUG) fprintf (stderr, "send: %s\n", string);
 
   free (string);
@@ -129,4 +135,5 @@
   /* read Nbytes from the device */
   status = read (device, message, length);
+  if (DEBUG) fprintf (stderr, "recv message: %s\n", message);
 
   if (status != length) {
