diff --git a/src/sync-core.cc b/src/sync-core.cc
index 8319c21..164296a 100644
--- a/src/sync-core.cc
+++ b/src/sync-core.cc
@@ -25,6 +25,34 @@
 const double SyncCore::WAIT = 0.05;
 const double SyncCore::RANDOM_PERCENT = 0.5;
 
+// for debugging
+static void
+printMsg(SyncStateMsgPtr &msg)
+{
+  cout << " ===== start Msg ======" << endl;
+  int size = msg->state_size();
+  if (size > 0)
+  {
+    int index = 0;
+    while (index < size)
+    {
+      SyncState state = msg->state(index);
+      string strName = state.name();
+      string strLocator = state.locator();
+      sqlite3_int64 seq = state.seq();
+      cout << "Name: " << Name((const unsigned char *)strName.c_str(), strName.size());
+      cout << ", Locator: " << Name((const unsigned char *)strLocator.c_str(), strLocator.size());
+      cout << ", seq: " << seq << endl;
+      index ++;
+    }
+  }
+  else
+  {
+    cout << "Msg size 0" << endl;
+  }
+  cout << " ++++++++ end Msg  ++++++++ \n\n" << endl;
+}
+
 SyncCore::SyncCore(SyncLogPtr syncLog, const Name &userName, const Name &localPrefix, const Name &syncPrefix, const StateMsgCallback &callback, const CcnxWrapperPtr &handle, const SchedulerPtr &scheduler)
          : m_log(syncLog)
          , m_scheduler(scheduler)
@@ -68,6 +96,10 @@
   {
     locator = m_yp[deviceName];
   }
+  else
+  {
+    cout << "self: " << m_userName << ", deviceName: " << deviceName << " not found in yp " << endl;
+  }
   return locator;
 }
 
@@ -96,6 +128,7 @@
   msgToBytes(msg, syncData);
   m_handle->publishData(syncName, syncData, FRESHNESS);
   cout << m_userName << " publishes: " << *oldHash << endl;
+  printMsg(msg);
 
   // no hurry in sending out new Sync Interest; if others send the new Sync Interest first, no problem, we know the new root hash already;
   // this is trying to avoid the situation that the order of SyncData and new Sync Interest gets reversed at receivers
@@ -161,6 +194,7 @@
     msgToBytes(msg, syncData);
     m_handle->publishData(name, syncData, FRESHNESS);
     cout << m_userName << " publishes " << hash << endl;
+    printMsg(msg);
   }
   else
   {
@@ -188,6 +222,8 @@
     Bytes syncData;
     msgToBytes(msg, syncData);
     m_handle->publishData(name, syncData, FRESHNESS);
+    cout << m_userName << " publishes: " << *hash << endl;
+    printMsg(msg);
   }
   else
   {
@@ -251,6 +287,8 @@
     return;
   }
 
+  cout << m_userName << " receives Msg " << endl;
+  printMsg (msg);
   int size = msg->state_size();
   int index = 0;
   while (index < size)
@@ -272,6 +310,7 @@
         m_log->UpdateLocator(deviceName, locatorName);
         WriteLock lock(m_ypMutex);
         m_yp[deviceName] = locatorName;
+        cout << "self: " << m_userName << ", device: " << deviceName << " < == > " << locatorName << endl;
       }
     }
     else
