diff --git a/nlsr-sync-0.0/nlsr_lsdb.c b/nlsr-sync-0.0/nlsr_lsdb.c
index 51133cd..87f2b9e 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.c
+++ b/nlsr-sync-0.0/nlsr_lsdb.c
@@ -61,7 +61,9 @@
 	memcpy(key+strlen(key),lst,strlen(lst));
 	memcpy(key+strlen(key),"/",1);
 	memcpy(key+strlen(key),lsid,strlen(lsid));
-	printf("%s\n", key);
+	
+	if ( nlsr->debugging )
+		printf("%s\n", key);
 }
 
 
@@ -69,7 +71,9 @@
 make_name_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, long int ls_id,char *orig_time,char *slice_prefix)
 {
 	sprintf(key,"%s/%d/%ld/%s%s",slice_prefix, ls_type, ls_id, orig_time, orig_router);
-	printf("%s\n",key);
+	
+	if ( nlsr->debugging )
+		printf("%s\n",key);
 }
 
 void 
@@ -77,7 +81,9 @@
 {
 		
 	sprintf(key,"%s/%d/%s%s",slice_prefix,ls_type, orig_time, orig_router);	
-	printf("Key:%s\n",key);	
+
+	if ( nlsr->debugging )
+		printf("Key:%s\n",key);	
 }
 
 void 
@@ -1023,12 +1029,13 @@
 		face=strtok_r(NULL,sep,&rem);
 		metric=strtok_r(NULL,sep,&rem);
 
-		printf("		Link %d	 	\n",i+1);
-		printf("		Neighbor		 : %s	\n",rtr_id);
-		printf("		Neighbor Length		 : %s	\n",length);
-		printf("		Connecting Face		 : %s	\n",face);
-		printf("		Metric			 : %s	\n",metric);
-
+		if ( nlsr->debugging ) {
+			printf("		Link %d	 	\n",i+1);
+			printf("		Neighbor		 : %s	\n",rtr_id);
+			printf("		Neighbor Length		 : %s	\n",length);
+			printf("		Connecting Face		 : %s	\n",face);
+			printf("		Metric			 : %s	\n",metric);
+		}
 
 		for(i=1;i<no_link;i++)
 		{
@@ -1567,7 +1574,9 @@
 
 
 	make_name_lsa_key(key, np->name,ls_type,ls_id);	
-	printf("Key:%s Length:%d\n",key,(int)strlen(key));
+	
+	if ( nlsr->debugging )
+		printf("Key:%s Length:%d\n",key,(int)strlen(key));
 
 	struct nlsa *nlsa;
 
@@ -2111,14 +2120,17 @@
 
 
 		make_name_lsa_key(key, name_lsa->header->orig_router->name,name_lsa->header->ls_type,name_lsa->header->ls_id);
-		printf("Name LSA Key: %s \n",key);
+		
+		if ( nlsr->debugging )
+			printf("Name LSA Key: %s \n",key);
 
 
 		char *repo_key=(char *)malloc(strlen(slice_prefix)+1+strlen(name_lsa->header->orig_router->name)+1+strlen(lst)+1+strlen(lsid)+1+strlen(name_lsa->header->orig_time)+1);
 		memset(repo_key,0,strlen(slice_prefix)+1+strlen(name_lsa->header->orig_router->name)+1+strlen(lst)+1+strlen(lsid)+1+strlen(name_lsa->header->orig_time)+1);	
 		make_name_lsa_prefix_for_repo(repo_key, name_lsa->header->orig_router->name,name_lsa->header->ls_type,name_lsa->header->ls_id,name_lsa->header->orig_time,slice_prefix);
 		
-		printf("Name LSA Repo Key: %s \n",repo_key);
+		if ( nlsr->debugging )
+			printf("Name LSA Repo Key: %s \n",repo_key);
 
 		struct name_prefix *lsaid=(struct name_prefix *)malloc(sizeof(struct name_prefix));
 		lsaid->name=(char *)malloc(strlen(key)+1);
diff --git a/nlsr-sync-0.0/nlsr_route.c b/nlsr-sync-0.0/nlsr_route.c
index 8537b2e..25b99dc 100755
--- a/nlsr-sync-0.0/nlsr_route.c
+++ b/nlsr-sync-0.0/nlsr_route.c
@@ -277,7 +277,9 @@
 {
 	if (parent[dest] != EMPTY_PARENT )
 		print_path(parent,parent[dest]);
-	printf(" %ld",dest);
+
+	if ( nlsr->debugging )
+		printf(" %ld",dest);
 }
 
 int 
diff --git a/nlsr-sync-0.0/nlsr_sync.c b/nlsr-sync-0.0/nlsr_sync.c
index 313b1b9..34ef71a 100644
--- a/nlsr-sync-0.0/nlsr_sync.c
+++ b/nlsr-sync-0.0/nlsr_sync.c
@@ -65,7 +65,9 @@
         ccn_uri_append(uri, name->buf, name->length, 1);
     else
         ccn_charbuf_append_string(uri, "(null)");
-    printf("%s %s %s\n", ccn_charbuf_as_string(uri), hexL, hexR);
+
+    if ( nlsr->debugging )
+    	printf("%s %s %s\n", ccn_charbuf_as_string(uri), hexL, hexR);
     fflush(stdout);
     free(hexL);
     free(hexR);
@@ -427,7 +429,8 @@
 			int is_new_name_lsa=check_is_new_name_lsa(orig_router->name,(char *)lst,(char *)lsid,(char *)origtime);
 			if ( is_new_name_lsa == 1 )
 			{
-				printf("New NAME LSA.....\n");	
+				if ( nlsr->debugging )
+					printf("New NAME LSA.....\n");	
 				//content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
 				get_content_by_content_name(ccn_charbuf_as_string(uri), &content_data);
 				printf("Content Data: %s \n",content_data);
@@ -435,22 +438,28 @@
 			}
 			else 
 			{
-				printf("Name LSA / Newer Name LSA already xists in LSDB\n");
+				if ( nlsr->debugging )
+					printf("Name LSA / Newer Name LSA already xists in LSDB\n");
 				//content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
 				get_content_by_content_name(ccn_charbuf_as_string(uri), &content_data);
-				printf("Content Data: %s \n",content_data);
+				
+				if ( nlsr->debugging )
+					printf("Content Data: %s \n",content_data);
 			}
 		}
 		else 
 		{
-			printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
+			if ( nlsr->debugging )
+				printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
 		}
 	}
 	else if(ls_type == LS_TYPE_ADJ)
 	{
 		res=ccn_name_comp_get(content_name->buf, components,lsa_position+2,&origtime, &comp_size);
 		get_name_part(orig_router,content_name,components,2);
-		printf("Orig Time: %s\nOrig Router: %s\n",origtime,orig_router->name);
+		
+		if ( nlsr->debugging )
+			printf("Orig Time: %s\nOrig Router: %s\n",origtime,orig_router->name);
 
 		int lsa_life_time=get_time_diff(time_stamp,(char *)origtime);
 
@@ -461,23 +470,28 @@
 			int is_new_adj_lsa=check_is_new_adj_lsa(orig_router->name,(char *)lst,(char *)origtime);
 			if ( is_new_adj_lsa == 1 )
 			{
-				printf("New Adj LSA.....\n");	
+				if ( nlsr->debugging )
+					printf("New Adj LSA.....\n");	
 				//content_data=get_content_by_content_name(ccn_charbuf_as_string(uri));
 				get_content_by_content_name(ccn_charbuf_as_string(uri), &content_data);
-				printf("Content Data: %s \n",content_data);
+				
+				if ( nlsr->debugging )
+					printf("Content Data: %s \n",content_data);
 				process_incoming_sync_content_lsa(content_data);			
 			}
 			else
 			{
-
-				printf("Adj LSA / Newer Adj LSA already exists in LSDB\n");
+				if ( nlsr->debugging )
+					printf("Adj LSA / Newer Adj LSA already exists in LSDB\n");
 				get_content_by_content_name(ccn_charbuf_as_string(uri), &content_data);
-				printf("Content Data: %s \n",content_data);
+				if ( nlsr->debugging )
+					printf("Content Data: %s \n",content_data);
 			}
 		}
 		else 
 		{
-			printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
+			if ( nlsr->debugging )
+				printf("Lsa is older than Router LSA refresh time/ Dead Interval\n");
 		}
 	}
 
