diff --git a/apps/files_sharing/ajax/share.php b/apps/files_sharing/ajax/share.php
index 6a2b45b3a7df6979815ea1b93c0339953a6c9ea2..d1f509943179e252facc3d4455857131295dc2fc 100644
--- a/apps/files_sharing/ajax/share.php
+++ b/apps/files_sharing/ajax/share.php
@@ -15,6 +15,7 @@ foreach ($sources as $source) {
 		$source = $userDirectory.$source;
 	// If the file doesn't exist, it may be shared with the current user
 	} else if (!$source = OC_Share::getSource($userDirectory.$source)) {
+		OC_Log::write('files_sharing',"Shared file doesn't exists :".$source,OC_Log::ERROR);
 		echo "false";
 	}
 	try {
@@ -23,6 +24,7 @@ foreach ($sources as $source) {
 			echo $shared->getToken();
 		}
 	} catch (Exception $exception) {
+		OC_Log::write('files_sharing',"Unexpected Error : ".$exception->getMessage(),OC_Log::ERROR);
 		echo "false";
 	}
 }
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php
index 0f1ddfee32ff3a5f2b64005b62e77df93a9894e4..cde33fd1dc58fd11906f11e53bed17134854c1fd 100644
--- a/apps/files_sharing/lib_share.php
+++ b/apps/files_sharing/lib_share.php
@@ -282,6 +282,7 @@ class OC_Share {
 					return $result[0]['permissions'];
 				}
 			} else {
+				OC_Log::write('files_sharing',"Not existing parent folder : ".$target,OC_Log::ERROR);
 				return false;
 			}
 		}