diff --git a/nlsr_km.c b/nlsr_km.c
index 2bfa8fa..995db18 100644
--- a/nlsr_km.c
+++ b/nlsr_km.c
@@ -29,7 +29,8 @@
 										char *site_name,
 										char *router_name){
 	
-	printf("sign_content_with_user_defined_keystore called\n");
+	if ( nlsr->debugging )
+		printf("sign_content_with_user_defined_keystore called\n");
 
 	
 	int res;
@@ -43,7 +44,8 @@
 	keystore=ccn_keystore_create();
 	res=ccn_keystore_init(keystore, keystore_path,keystore_passphrase );
 	if ( res < 0 ){
-		printf("Error in initiating keystore :(\n");
+		if ( nlsr->debugging )
+			printf("Error in initiating keystore :(\n");
 		ccn_keystore_destroy(&keystore);
 		return -1;
 	}
@@ -51,11 +53,12 @@
 
 	res=ccn_load_private_key	(nlsr->ccn,
 							keystore_path,
-							"Th1s1sn0t8g00dp8ssw0rd.",
+							keystore_passphrase,
 							pubid_out);
 
 	if(res < 0 ){
-		printf("Error in loading keystore :( \n");
+		if ( nlsr->debugging )
+			printf("Error in loading keystore :( \n");
 		ccn_charbuf_destroy(&pubid_out);
 		return -1;
 	}
@@ -63,7 +66,8 @@
 	char *baseuri=(char *)calloc(strlen(key_repo_name)+strlen(site_name)+
 				  strlen(router_name)+strlen("/%C1.R.N.Start")+5,sizeof(char));
 	memcpy(baseuri,key_repo_name,strlen(key_repo_name)+1);
-	memcpy(baseuri+strlen(baseuri),"/",1);
+	if ( site_name[0] != '/')
+		memcpy(baseuri+strlen(baseuri),"/",1);
 	memcpy(baseuri+strlen(baseuri),site_name,strlen(site_name)+1);
 	memcpy(baseuri+strlen(baseuri),"/%C1.R.N.Start",strlen("/%C1.R.N.Start"));
 	memcpy(baseuri+strlen(baseuri),router_name,strlen(router_name)+1);
@@ -78,7 +82,8 @@
 	}
 	ccn_name_from_uri(keyname,baseuri);
 	if ( res < 0 ){
-		printf("Bad URI format: %s\n",baseuri);
+		if ( nlsr->debugging )
+			printf("Bad URI format: %s\n",baseuri);
 		ccn_charbuf_destroy(&pubid_out);
 		ccn_charbuf_destroy(&keyname);
 		free(baseuri);
@@ -97,7 +102,8 @@
 
 	struct ccn_charbuf *uri = ccn_charbuf_create();
 	ccn_uri_append(uri, keyname->buf, keyname->length, 0);
-	printf("Key Name Included when processing content: %s\n", ccn_charbuf_as_string(uri));
+	if ( nlsr->debugging )
+		printf("Key Name Included when processing content: %s\n", ccn_charbuf_as_string(uri));
 	ccn_charbuf_destroy(&uri);	
 
 	struct ccn_signing_params sp = CCN_SIGNING_PARAMS_INIT;
@@ -117,7 +123,8 @@
 
 
 	if (pubid_out->length != sizeof(sp.pubid)){
-		printf("Size of pubid and sp.pubid is not equal");
+		if ( nlsr->debugging )
+			printf("Size of pubid and sp.pubid is not equal");
 		ccn_charbuf_destroy(&keyname);
 		ccn_charbuf_destroy(&pubid_out);
 		free(baseuri);
@@ -130,7 +137,8 @@
 
 	res=ccn_sign_content(nlsr->ccn,resultbuf,content_name,&sp,data,data_size);
 	if( res < 0 ){
-		printf("Content signing error \n");
+		if ( nlsr->debugging )
+			printf("Content signing error \n");
 		ccn_charbuf_destroy(&sp.template_ccnb);
 		ccn_charbuf_destroy(&keyid);
 		ccn_charbuf_destroy(&keyname);
@@ -170,8 +178,8 @@
 int 
 verify_key(const unsigned char *ccnb,size_t size, 
 										struct ccn_parsed_ContentObject *pco){
-
-	printf("verify key called\n");
+	if ( nlsr->debugging )
+		printf("verify key called\n");
 	int ret=-1;
 
 	if ( contain_key_name(ccnb, pco) == 1){
@@ -179,9 +187,11 @@
 		struct ccn_charbuf *key_name=get_key_name(ccnb, pco);
 		struct ccn_charbuf *key_uri = ccn_charbuf_create();
 		ccn_uri_append(key_uri, key_name->buf, key_name->length, 0);
-		printf("Key Name from Incoming Content: %s\n",ccn_charbuf_as_string(key_uri));
-		int res=get_key_type_from_key_name(key_name);		
-		printf("Key Type: %d \n",res);
+		if ( nlsr->debugging )
+			printf("Key Name from Incoming Content: %s\n",ccn_charbuf_as_string(key_uri));
+		int res=get_key_type_from_key_name(key_name);
+		if ( nlsr->debugging )		
+			printf("Key Type: %d \n",res);
 
 		struct ccn_charbuf *result = ccn_charbuf_create();
 		struct ccn_parsed_ContentObject temp_pco = {0};
@@ -194,10 +204,12 @@
 		int chk_verify=ccn_verify_content(nlsr->ccn,ccnb,pco);		
 
 		if ( chk_verify == 0 ){
-			printf("Verification Successful :)\n");
+			if ( nlsr->debugging )
+				printf("Verification Successful :)\n");
 
 			if ( counter == 3){
-				printf("Could not retrieve key by name !!!\n");
+				if ( nlsr->debugging )
+					printf("Could not retrieve key by name !!!\n");
 			}
 			else{
 				if ( res == ROOT_KEY ){
