Index: DataLoader/loader.py
===================================================================
--- DataLoader/loader.py	(revision 94daf8a30376d53e5a94386b5aa8e6b2aba5a656)
+++ DataLoader/loader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -94,5 +94,5 @@
                 dir='readers'
             
-            if reader==None and  ext==None:#1st load
+            if (reader==None and  ext==None) or dir:#1st load
                 plugReader=None
                 if os.path.isdir(dir):
Index: DataLoader/plugins/TXT2_Reader.py
===================================================================
--- DataLoader/plugins/TXT2_Reader.py	(revision 1b0b3caf0d36b06b15063e0f874716be68bc2984)
+++ DataLoader/plugins/TXT2_Reader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -2,4 +2,5 @@
 import wx
 import string,numpy
+import logging
 class Reader:
     """
@@ -27,5 +28,8 @@
                 return None
             else:
-                input_f =  open(path,'r')
+                try:
+                    input_f =  open(path,'r')
+                except :
+                    raise  RuntimeError,"TXT2_Reader cannot open %s"%(path)
                 buff = input_f.read()
                 lines = buff.split('\n')
@@ -63,5 +67,5 @@
                     #msg="R1 reading: \n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n"
                     #return msg
-                    print "TXT2_Reader reading  %s\n" %path
+                    logging.info("TXT2_Reader reading  %s\n" %path)
                     return self.x,self.y,self.dy
         return None
Index: DataLoader/plugins/TXT3_Reader.py
===================================================================
--- DataLoader/plugins/TXT3_Reader.py	(revision 1b0b3caf0d36b06b15063e0f874716be68bc2984)
+++ DataLoader/plugins/TXT3_Reader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -2,4 +2,5 @@
 import wx
 import string,numpy
+import logging
 class Reader:
     """
@@ -31,5 +32,8 @@
                 return None
             else:
-                input_f =  open(path,'r')
+                try:
+                    input_f =  open(path,'r')
+                except :
+                    raise  RuntimeError,"TXT3_Reader cannot open %s"%(path)
                 buff = input_f.read()
                 lines = buff.split('\n')
@@ -65,5 +69,5 @@
                     #msg="txtReader  Reading:\n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n"
                     #return msg
-                    print "TXT3_Reader reading %s \n" %path
+                    logging.info ("TXT3_Reader reading %s \n" %(path))
                     return self.x,self.y,self.dy
                 
Index: DataLoader/readers/IgorReader.py
===================================================================
--- DataLoader/readers/IgorReader.py	(revision 2fd516b3b48ecf8acd3ff3a9ec83eb52fb5b4685)
+++ DataLoader/readers/IgorReader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -2,5 +2,5 @@
 import pylab
 from copy import deepcopy
-import math
+import math,logging
 class Reader:
     """ Simple data reader for Igor data files """
@@ -165,5 +165,5 @@
         self.center_x = center_x
         self.center_y = center_y
-        print "IgorReader reading %s"%self.file
+        logging.info("IgorReader reading %s"%self.file)
         return Z, xmin-xstep/2.0, xmax+xstep/2.0, ymin-ystep/2.0, ymax+ystep/2.0
      
Index: DataLoader/readers/TXT2_Reader.py
===================================================================
--- DataLoader/readers/TXT2_Reader.py	(revision 8dac49d32e54e0e6e0afc41639432bd3c2aa4838)
+++ DataLoader/readers/TXT2_Reader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -1,5 +1,5 @@
 # class Loader  to load any king of file
 import wx
-import string,numpy
+import string,numpy,logging
 class Reader:
     """
@@ -27,5 +27,8 @@
                 return None
             else:
-                input_f =  open(path,'r')
+                try:
+                    input_f =  open(path,'r')
+                except :
+                    raise  RuntimeError,"TXT2_Reader cannot open %s"%(path)
                 buff = input_f.read()
                 lines = buff.split('\n')
@@ -63,5 +66,5 @@
                     #msg="R1 reading: \n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n"
                     #return msg
-                    print "TXT2_Reader reading  %s\n" %path
+                    logging.info("TXT2_Reader reading  %s\n" %path)
                     return self.x,self.y,self.dy
         return None
Index: DataLoader/readers/TXT3_Reader.py
===================================================================
--- DataLoader/readers/TXT3_Reader.py	(revision 1b0b3caf0d36b06b15063e0f874716be68bc2984)
+++ DataLoader/readers/TXT3_Reader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -1,5 +1,5 @@
 # class Loader  to load any king of file
 import wx
-import string,numpy
+import string,numpy,logging
 class Reader:
     """
@@ -31,5 +31,8 @@
                 return None
             else:
-                input_f =  open(path,'r')
+                try:
+                    input_f =  open(path,'r')
+                except :
+                    raise  RuntimeError,"TXT3_Reader cannot open %s"%(path)
                 buff = input_f.read()
                 lines = buff.split('\n')
@@ -65,5 +68,5 @@
                     #msg="txtReader  Reading:\n"+"this x :"+ str(self.x) +"\n"+"this y:"+str(self.y)+"\n"+"this dy :"+str(self.dy)+"\n"
                     #return msg
-                    print "TXT3_Reader reading %s \n" %path
+                    logging.info("TXT3_Reader reading %s \n" %path)
                     return self.x,self.y,self.dy
                 
Index: DataLoader/readers/danse_reader.py
===================================================================
--- DataLoader/readers/danse_reader.py	(revision c125e0c0a070d9e2df2b41c47a399ab68ac05667)
+++ DataLoader/readers/danse_reader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -7,4 +7,5 @@
 import copy
 import numpy
+import logging
 class ReaderInfo:
     """
@@ -61,6 +62,9 @@
                 
         if read_it:
-            
-            datafile = open(filename, 'r')
+            try:
+                 datafile = open(filename, 'r')
+            except :
+                raise  RuntimeError,"danse_reader cannot open %s"%(filename)
+            
             
             # defaults
@@ -126,6 +130,7 @@
                             error.append(err)
                         except:
-                            print "Skipping line:%s" % data_str
-                            print sys.exc_value
+                            logging.info("Skipping line:%s,%s" %( data_str,sys.exc_value))
+                            #print "Skipping line:%s" % data_str
+                            #print sys.exc_value
             
             # Initialize 
@@ -209,5 +214,5 @@
                 raise ValueError,"Danse_reader can't read this file %s"%filename
             else:
-                print "Danse_reader Reading %s \n"%filename
+                logging.info("Danse_reader Reading %s \n"%filename)
                 return output
         
Index: DataLoader/readers/tiff_reader.py
===================================================================
--- DataLoader/readers/tiff_reader.py	(revision 3dd7cce4a558d0fc8b36bb5276e3f499f5f8a04c)
+++ DataLoader/readers/tiff_reader.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -1,5 +1,5 @@
 
 import Image
-import math
+import math,logging
 class ReaderInfo:
     """
@@ -46,4 +46,5 @@
         
     def read(self, filename=None):
+        print "in tiff"
         """
             Open and read the data in a file
@@ -144,5 +145,6 @@
             output.image      = Z
             output.pixel_size = pixel
-                
+            logging.info("tiff_reader reading %s"%(filename))
+            
             return output
         
Index: DataLoader/test/testLoad.py
===================================================================
--- DataLoader/test/testLoad.py	(revision 94daf8a30376d53e5a94386b5aa8e6b2aba5a656)
+++ DataLoader/test/testLoad.py	(revision 8d6440f96618cd67430e155f2bf52d5f801dd467)
@@ -104,5 +104,5 @@
         data=self.L.load('MP_New.sans')
         
-        self.assertEqual(data.__class__,danse_reader.ReaderInfo)
+        self.assertEqual(data.wavelength,7.5)
         
         #tested corrupted file.sans
@@ -112,13 +112,14 @@
            logging.error(str(msg))
         #else: raise ValueError,"No error raised for missing extension"
+        
     def testload5(self):
         """ Testing loading image file"""
         data=self.L.load('angles_flat.png')
-        self.assertEqual(data.__class__,tiff_reader.ReaderInfo)
+        self.assertEqual(data.xbins ,200)
         
     def testload6(self):
         """test file with unknown extension"""
         try:self.L.load('hello.missing')
-        except ValueError,msg:
+        except RuntimeError,msg:
            self.assertEqual( str(msg),"Unknown file type '.missing'")
         else: raise ValueError,"No error raised for missing extension"
@@ -126,5 +127,5 @@
         #self.L.lookup('hello.missing')
         try: self.L.lookup('hello.missing')
-        except ValueError,msg:
+        except RuntimeError,msg:
            self.assertEqual( str(msg),"Unknown file type '.missing'")
         else: raise ValueError,"No error raised for missing extension"
