Index: guiframe/data_loader.py
===================================================================
--- guiframe/data_loader.py	(revision 9b187350a27b63e0f6acf1eba38d6f445fbe7eae)
+++ guiframe/data_loader.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
@@ -172,13 +172,13 @@
         load_error(sys.exc_value)
         return
-    
+    basename  = os.path.basename(path)
     # Notify user if the loader completed the load but no data came out
     if output == None:
-        basename  = os.path.basename(path)
         if  not basename.endswith('.svs'):
             load_error("The data file appears to be empty.")
         return
   
-     
+    root, extension = os.path.splitext(basename)
+    ext =  extension.lower()
     filename = os.path.basename(path)
     if not  output.__class__.__name__ == "list":
@@ -229,5 +229,5 @@
         # plot data
         wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=title))
-        if format in SVS_FILE_EXT:
+        if ext in SVS_FILE_EXT:
             # set state and plot computation if exists
             wx.PostEvent(parent,InvStateUpdateEvent())
@@ -299,5 +299,5 @@
                 wx.PostEvent(parent, NewPlotEvent(plot=new_plot, title=str(title)))
                 
-                if format in SVS_FILE_EXT:
+                if ext in SVS_FILE_EXT:
                     # set state and plot computation if exists
                     wx.PostEvent(parent,InvStateUpdateEvent())
Index: guiframe/gui_manager.py
===================================================================
--- guiframe/gui_manager.py	(revision 9b187350a27b63e0f6acf1eba38d6f445fbe7eae)
+++ guiframe/gui_manager.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
@@ -795,4 +795,5 @@
             fd.close()
         else:
+            print "Nothing to save..."
             raise RuntimeError, "%s is not a SansView (.svs) file..." % path
 
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision 9b187350a27b63e0f6acf1eba38d6f445fbe7eae)
+++ sansview/perspectives/fitting/fitting.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
@@ -119,4 +119,5 @@
         self.temp_state = []
         self.state_index = 0
+        self.sfile_ext = None
         # Log startup
         logging.info("Fitting plug-in started") 
@@ -295,5 +296,5 @@
         pass
     
-    def set_state(self, state, datainfo=None):
+    def set_state(self, state=None, datainfo=None, format=None):
         """
         Call-back method for the fit page state reader.
@@ -303,8 +304,13 @@
         : param datainfo: data
         """
-        # store fitting state in temp_state
-        self.temp_state.append(state) 
+        if state != None:
+            # store fitting state in temp_state
+            self.temp_state.append(state) 
+        else:
+            self.temp_state = []
         # index to start with for a new set_state
         self.state_index = 0
+        # state file format
+        self.sfile_ext = format
 
     def  on_set_state_helper(self,event=None):
@@ -314,7 +320,9 @@
         : event: FitStateUpdateEvent called by dataloader.plot_data from guiframe
         """
-        if self.temp_state == None or len(self.temp_state) == 0:
+        if len(self.temp_state) == 0 and self.sfile_ext =='.svs':
             if self.state_index==0 and len(self.mypanels) <= 0:
                 self.fit_panel.add_default_pages()
+                self.temp_state = []
+                self.state_index = 0
             return
         
@@ -331,4 +339,5 @@
                 panel = self.fit_panel.add_page(page_info)
                 self.store_page(page=panel, data=state.data)
+                self.mypanels.append(panel) 
                 
             # get ready for the next set_state
@@ -339,7 +348,9 @@
                 
                 self.temp_state = []
+                #self.state_index = 0
                 # Make sure the user sees the fitting panel after loading
                 self.parent.set_perspective(self.perspective) 
         except:
+            self.state_index==0
             self.temp_state = []
             raise
Index: sansview/perspectives/fitting/pagestate.py
===================================================================
--- sansview/perspectives/fitting/pagestate.py	(revision 9b187350a27b63e0f6acf1eba38d6f445fbe7eae)
+++ sansview/perspectives/fitting/pagestate.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
@@ -1096,12 +1096,14 @@
         """
         output = []
+        basename  = os.path.basename(path)
+        root, extension = os.path.splitext(basename)
+        ext = extension.lower()
         try:
             if os.path.isfile(path):
-                basename  = os.path.basename(path)
-                root, extension = os.path.splitext(basename)
+                
                 #TODO: eventually remove the check for .xml once
                 # the P(r) writer/reader is truly complete.
-                if  extension.lower() in self.ext or \
-                    extension.lower() == '.xml':
+                if  ext in self.ext or \
+                    ext == '.xml':
                     
                     tree = etree.parse(path, parser=etree.ETCompatXMLParser())
@@ -1124,8 +1126,10 @@
                             output.append(sas_entry)
             else:
+                self.call_back(format=ext)
                 raise RuntimeError, "%s is not a file" % path
 
             # Return output consistent with the loader's api
             if len(output)==0:
+                self.call_back(state=None, datainfo=None,format=ext)
                 return None
             else:
@@ -1158,9 +1162,9 @@
                     state.data.group_id = name
                     #store state in fitting
-                    self.call_back(state=state, datainfo=output[ind])
-                    
+                    self.call_back(state=state, datainfo=output[ind],format=ext)
                 return output
               
         except:
+            self.call_back(format=ext)
             raise
            
