diff --git a/process/Leadimport_lib/process.js b/process/Leadimport_lib/process.js
index 3d89bd67276f108f12e05cd9a2d756e825bc8c7b..f0ccc50866953215ba0dbcdc947e7bc5281c0f4e 100644
--- a/process/Leadimport_lib/process.js
+++ b/process/Leadimport_lib/process.js
@@ -214,7 +214,7 @@ function ImportData(pDataFields, pDataTypes, pFieldDef, pFieldValues, pImportDef
 
     var leadId = InsertTable(pDataFields, pDataTypes ,LeadValues, "LEAD", pUser, pDate);//inserts the LEAD dataset
 
-    InsertLeadAttr(pAttrObject, orgid, persid, LeadValues["DATE_NEW"], pUser, pDate, orgRet[3]);
+    InsertLeadAttr(pAttrObject, orgid, persid, LeadValues["DATE_NEW"], pUser, pDate, (orgRet && orgRet.length >= 4 && orgRet[3]));
     
     return [leadId, persForDubCheck, orgsForDubCheck];
 }
@@ -466,7 +466,7 @@ function InsertComm(pDataFields, pDataTypes, pLeadValues, contactId, pUser, pDat
 * @param {String} pUser req the importuser
 * @param {String} pDate req the importdate
 *
-* @return {String []} ( organisationId, contactId, duplicateMapping, true/false)
+* @return {String[]} ( organisationId, contactId, duplicateMapping, true/false)
 */
 function InsertOrg(pDataFields, pDataTypes,  pFieldDef, pFieldValues, pUser, pDate)
 {
diff --git a/process/importLead_serverProcess/process.js b/process/importLead_serverProcess/process.js
index 1b93ce3fd3cf3d69f329ecae115ad9ace95014d8..a1e3c5104afb7a44c421da7c76c40f62b2514077 100644
--- a/process/importLead_serverProcess/process.js
+++ b/process/importLead_serverProcess/process.js
@@ -129,12 +129,14 @@ try
         {
             var dupCheck = ImportData(DataFields, DataTypes, FieldDef, impvalues, importdefid, AttrObject, source, user, currDate);
 
-            allContactData[dubCheck[0]] = [dupCheck[1], dupCheck[2]];   //persObj, orgObj
+            allContactData[dupCheck[0]] = [dupCheck[1], dupCheck[2]];   //persObj, orgObj
         }
         catch(ex)//if error increase the errorCount and write a rhinoException into the string for the error file
         {
-            exeptions = exeptions + "Zeile " + dsanz + ": " + logging.toLogString(ex.rhinoException != undefined ? ex.rhinoException : ex, true) + "\r\n";
+            var exeption = "Zeile " + dsanz + ": " + logging.toLogString(ex.rhinoException != undefined ? ex.rhinoException : ex, true) + "\r\n";
+            exeptions = exeptions + exeption;
             errorCount++;
+            logging.log(exeption);
         }
     }
 }
@@ -171,6 +173,7 @@ if(exeptions != "")//insert error document
 if (userId)// if there is an user - show a notification to this user when the import is complete
 {
     var description = translate.withArguments("%0 leads imported, %1 errors", [rows, errorCount]);
+    logging.log(JSON.stringify([exeptions], null, "\t"))
     notification.addNotification(util.getNewUUID(), null, null, null, "LeadImport_Notification", notification.PRIO_NORMAL, 2, notification.STATE_UNSEEN, [userId], importName, description);
 }