--- marc.module	2007-11-26 14:51:18.000000000 +0100
+++ /opt/lampp/htdocs/drupal/sites/all/modules/marc/marc.module	2008-02-11 13:17:22.000000000 +0100
@@ -290,6 +290,11 @@ function marc_import_files() {
     $value = $file->basename;
     $fileoptions[$key] = $value;
   }
+
+  //No files error message
+  if (empty($fileoptions)) {
+    drupal_set_message (t('There are not any valid files in the "@marc_file_directory_path"  directory.', array('@marc_file_directory_path' => $directory )),'error');
+  }
 
   return $fileoptions;//array of files in specified directory of marc records.
 }
@@ -300,10 +305,17 @@ function marc_import_files() {
 
 function marc_import_nodes() {
   $result = db_query("SELECT content_type FROM {marc_content_type_mapping}");
+
+  //No defines nodes error message
+  if (empty($result)) {
+    drupal_set_message (t('There are not any valid types. You must define them in the content type page, clicking in the marc tab.'),'error');
+  }
+
   $types = array();
   while ($marc = db_fetch_object($result)) {
     $types[$marc->content_type] = $marc->content_type;
   }
+
   return $types;//array of nodes that have MARC mapping
 }
 
