diff --git a/nlsr-sync-0.0/nlsr.c b/nlsr-sync-0.0/nlsr.c
index 6faf6cc..d25fb9d 100755
--- a/nlsr-sync-0.0/nlsr.c
+++ b/nlsr-sync-0.0/nlsr.c
@@ -1216,8 +1216,13 @@
 
 	init_api_server(ccn_fd);
 
-	create_sync_slice(nlsr->topo_prefix, nlsr->slice_prefix);	
-
+	res=create_sync_slice(nlsr->topo_prefix, nlsr->slice_prefix);
+	if(res<0)
+	{
+		fprintf(stderr, "Can not create slice for prefix %s\n",nlsr->slice_prefix);
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Can not create slice for prefix %s\n",nlsr->slice_prefix);
+		ON_ERROR_DESTROY(res);
+	}
 	struct ccn_charbuf *router_prefix;	
 	router_prefix=ccn_charbuf_create(); 
 	res=ccn_name_from_uri(router_prefix,nlsr->router_name);		
diff --git a/nlsr-sync-0.0/nlsr_lsdb.c b/nlsr-sync-0.0/nlsr_lsdb.c
index 87f2b9e..70c6111 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.c
+++ b/nlsr-sync-0.0/nlsr_lsdb.c
@@ -63,7 +63,7 @@
 	memcpy(key+strlen(key),lsid,strlen(lsid));
 	
 	if ( nlsr->debugging )
-		printf("%s\n", key);
+		printf("name LSA Key: %s\n", key);
 }
 
 
@@ -73,7 +73,7 @@
 	sprintf(key,"%s/%d/%ld/%s%s",slice_prefix, ls_type, ls_id, orig_time, orig_router);
 	
 	if ( nlsr->debugging )
-		printf("%s\n",key);
+		printf("Name LSA prefix for repo content: %s\n",key);
 }
 
 void 
@@ -83,7 +83,7 @@
 	sprintf(key,"%s/%d/%s%s",slice_prefix,ls_type, orig_time, orig_router);	
 
 	if ( nlsr->debugging )
-		printf("Key:%s\n",key);	
+		printf("Name LSA prefix for repo content:%s\n",key);	
 }
 
 void 
@@ -191,9 +191,6 @@
 	char *time_stamp=(char *)malloc(20);
 	memset(time_stamp,0,20);
 	get_current_timestamp_micro(time_stamp);
-	//long int lsa_life_time=get_time_diff(time_stamp,name_lsa->header->orig_time);
-
-	//printf("time difference: %ld \n",lsa_life_time);
 	
 
 		char lst[2];
@@ -1424,8 +1421,7 @@
 	if( res == HT_OLD_ENTRY )
 	{
 		name_lsa=e->data;
-		//printf("NAME LSA found\n");
-
+		
 		if ( nlsr->debugging )
 			printf("NAME LSA found  \n");	
 		if ( nlsr->detailed_logging )
@@ -1504,7 +1500,6 @@
 	if( res == HT_OLD_ENTRY )
 	{
 		adj_lsa=e->data;
-		//printf("Adj LSA found\n");
 
 		if ( nlsr->debugging )
 			printf("Adj LSA found  \n");	
@@ -1518,15 +1513,15 @@
 		memset(temp_length,0,20);
 		sprintf(temp_length,"%d",adj_lsa->header->orig_router->length);
 		ccn_charbuf_append_string(lsa_data,temp_length);
-		free(temp_length);
 		ccn_charbuf_append_string(lsa_data,"|");
+		free(temp_length);
 
 		char *temp_ltype=(char *)malloc(20);
 		memset(temp_ltype,0,20);
 		sprintf(temp_ltype,"%d",adj_lsa->header->ls_type);
 		ccn_charbuf_append_string(lsa_data,temp_ltype);
-		free(temp_ltype);
 		ccn_charbuf_append_string(lsa_data,"|");
+		free(temp_ltype);
 
 		ccn_charbuf_append_string(lsa_data,adj_lsa->header->orig_time);
 		ccn_charbuf_append_string(lsa_data,"|");
@@ -1535,8 +1530,8 @@
 		memset(temp_nl,0,20);
 		sprintf(temp_nl,"%d",adj_lsa->no_link);
 		ccn_charbuf_append_string(lsa_data,temp_nl);
-		free(temp_nl);
 		ccn_charbuf_append_string(lsa_data,"|");
+		free(temp_nl);
 
 		ccn_charbuf_append_string(lsa_data,adj_lsa->body);
 
diff --git a/nlsr-sync-0.0/nlsr_sync.c b/nlsr-sync-0.0/nlsr_sync.c
index 2a77331..094180f 100644
--- a/nlsr-sync-0.0/nlsr_sync.c
+++ b/nlsr-sync-0.0/nlsr_sync.c
@@ -66,8 +66,12 @@
     else
         ccn_charbuf_append_string(uri, "(null)");
 
+    //if ( nlsr->debugging )
+    	//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);
+	printf("Response from sync in the name: %s \n",ccn_charbuf_as_string(uri));	
+
     fflush(stdout);
     free(hexL);
     free(hexR);
@@ -83,6 +87,7 @@
 
 	process_content_from_sync(name,components);
 
+
  
 
   return(0);
@@ -320,8 +325,6 @@
 	
 	if ( nlsr->debugging )
 		printf("LSA Data \n");
-	//if ( nlsr->detailed_logging )
-	//	writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSA Data\n");	
 
 	if( strlen((char *)content_data ) > 0 )
 	{
@@ -563,7 +566,7 @@
     return(templ);
 }
 
-void
+int
 write_data_to_repo(char *data, char *name_prefix)
 {
 	if ( nlsr->debugging )
@@ -587,14 +590,16 @@
     res = ccn_name_from_uri(name, name_prefix);
     if (res < 0) {
         fprintf(stderr, "bad CCN URI: %s\n",name_prefix);
-        exit(1);
+        //exit(1);
+	return -1;
     }
   
     
     w = ccn_seqw_create(nlsr->ccn, name);
     if (w == NULL) {
         fprintf(stderr, "ccn_seqw_create failed\n");
-        exit(1);
+        //exit(1);
+	return -1;
     }
     ccn_seqw_set_block_limits(w, blocksize, blocksize);
     if (freshness > -1)
@@ -610,7 +615,8 @@
         ccn_charbuf_destroy(&name_v);
         if (res < 0) {
             fprintf(stderr, "No response from repository\n");
-            exit(1);
+            //exit(1);
+	    return -1;
         }
     }
 
@@ -634,6 +640,8 @@
     ccn_seqw_close(w);
     //ccn_run(nlsr->ccn, 1);
     ccn_charbuf_destroy(&name);
+
+	return 0;
 }
 
 
@@ -651,7 +659,8 @@
     if (prefix == NULL || topo == NULL || clause == NULL ||
         slice_name == NULL || slice_uri == NULL) {
         fprintf(stderr, "Unable to allocate required memory.\n");
-        exit(1);
+        //exit(1);
+	return -1;
     }
     
     
diff --git a/nlsr-sync-0.0/nlsr_sync.h b/nlsr-sync-0.0/nlsr_sync.h
index ef9d342..68fc767 100644
--- a/nlsr-sync-0.0/nlsr_sync.h
+++ b/nlsr-sync-0.0/nlsr_sync.h
@@ -2,7 +2,7 @@
 #define _NLSR_SYNC_H_
 
 void sync_monitor(char *topo_prefix, char *slice_prefix);
-void write_data_to_repo(char *data,char *name_prefix);
+int write_data_to_repo(char *data,char *name_prefix);
 int create_sync_slice(char *topo_prefix, char *slice_prefix);
 void get_host_name_from_command_string(struct name_prefix *name_part,char *nbr_name_uri, int offset);
 void process_content_from_sync(struct ccn_charbuf *content_name, struct ccn_indexbuf *components);
