diff --git a/tsg_io/read_data.m b/tsg_io/read_data.m
index 8720b204594c4d1d82fd03777efa55790b6e3538..dca48a81b127024712045f8d69a73dd05b9407f3 100644
--- a/tsg_io/read_data.m
+++ b/tsg_io/read_data.m
@@ -150,7 +150,7 @@ switch filterIndex
     
     % diplay warning msgbox
     % ---------------------
-    msgbox( {['Invalid TSG file: ' fileName],...
+    msgbox( {['Invalid TSG file: ' fullFileName],...
       'Please select another file'},...
       'Warning open file', 'warn', 'modal' );
     
diff --git a/tsgqc.m b/tsgqc.m
index 28214c130629e7e05a965d92f184ff466dd15ad9..b02270a9f090683c35c237d8a0e8f9838a3363cf 100644
--- a/tsgqc.m
+++ b/tsgqc.m
@@ -1257,6 +1257,11 @@ hrbInterpCancel = uicontrol( ...
       '*.sdf';'*.spl'; '*.transmit*'; '*.tsgqc';'*.xml';'*.cnv'});
     [fileName, pathname, filterIndex] = uigetfile( fileExtension, 'Pick a file');
     
+    % uigetfile add an extra index (*.*) and a bug if user select file from
+    % *.* and fileExtension(filterIndex) create an Index exceeds matrix
+    % now, we use strcat('*',ext) instead
+    [~,~,ext] = fileparts(fileName);
+    
     % flushes the event queue and updates the closed uigetfile window
     % ---------------------------------------------------------------
     drawnow;
@@ -1276,7 +1281,7 @@ hrbInterpCancel = uicontrol( ...
       
       % Read the data
       % -------------
-      [errTsg, errSpl] = read_data( hMainFig, char(fileExtension(filterIndex)), fullFileName);
+      [errTsg, errSpl] = read_data( hMainFig, strcat('*',ext), fullFileName);
       
       % Get the tsg structure
       % ---------------------