diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py
index be13dac302de073a01ac7a6b851aaeab500b79c8..f7eb209dac4700c8e556056573b2cd51c4b4f63e 100755
--- a/product/ERP5Type/Utils.py
+++ b/product/ERP5Type/Utils.py
@@ -364,6 +364,7 @@ def importLocalDocument(class_id, document_path = None):
       new_meta_types.append(meta_type)
     else:
       # Update new_meta_types
+      instance_class = None
       new_meta_types.append(
             { 'name': document_class.meta_type,
               'action': ('manage_addProduct/%s/%s' % ('ERP5Type', document_constructor_name)),
@@ -413,8 +414,10 @@ def initializeLocalDocumentRegistry():
         module_name = file_name[0:-3]
         try:
           importLocalDocument(module_name, document_path = document_path)
+          LOG('Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path),0,'')
           print 'Added local document to ERP5Type repository: %s (%s)' % (module_name, document_path)
         except:
+          LOG('Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path) % (module_name, document_path),0,'')
           print 'Failed to add local document to ERP5Type repository: %s (%s)' % (module_name, document_path)
 
 #####################################################