Index: trunk/Mars/merpp.cc
===================================================================
--- trunk/Mars/merpp.cc	(revision 11453)
+++ trunk/Mars/merpp.cc	(revision 11454)
@@ -47,13 +47,14 @@
     gLog << all << endl;
     gLog << "Sorry the usage is:" << endl;
-    gLog << " merpp [options] [tel:]seqnumber [outpath [inpath]]" << endl;
-    gLog << " merpp [options] [tel:]seqnumber outpath sumfile.txt" << endl;
-    gLog << " merpp [options] seqfile.txt     [outpath [inpath]]" << endl;
-    gLog << " merpp [options] seqfile.txt     outpath sumfile.txt" << endl;
+    gLog << " merpp [options] [tel:]seqnumber  [outpath [inpath]]" << endl;
+    gLog << " merpp [options] [tel:]seqnumber  outpath sumfile.txt" << endl;
+    gLog << " merpp [options] seqfile.txt      [outpath [inpath]]" << endl;
+    gLog << " merpp [options] seqfile.txt      outpath sumfile.txt" << endl;
 //    gLog << " merpp [options] mysql           [outpath [inpath]]" << endl;
 //    gLog << " merpp [options] mysql           outpath sumfile.txt" << endl;
-    gLog << " merpp [options] infile.raw.[gz] [outfile.root]" << endl;
-    gLog << " merpp [options] infile.rep      [outfile.root]" << endl;
-    gLog << " merpp [options] infile.txt      outfile.root" << endl;
+    gLog << " merpp [options] infile.raw[.gz]  [outfile.root]" << endl;
+    gLog << " merpp [options] infile.fits[.gz] [outfile.root]" << endl;
+    gLog << " merpp [options] infile.rep       [outfile.root]" << endl;
+    gLog << " merpp [options] infile.txt       outfile.root" << endl;
     gLog << endl;
     gLog << " Arguments:" << endl;
@@ -125,7 +126,8 @@
 {
     return
-        name.EndsWith(".rep") || name.EndsWith(".txt")    ||
-        name.EndsWith(".raw") || name.EndsWith(".raw.gz") ||
-        name.EndsWith(".root");
+        name.EndsWith(".rep")  || name.EndsWith(".txt")    ||
+        name.EndsWith(".raw")  || name.EndsWith(".raw.gz") ||
+        name.EndsWith(".root") ||
+        name.EndsWith(".fits") || name.EndsWith(".fits.gz");
 }
 
@@ -232,6 +234,7 @@
     else
     {
-        kNamein = arg0;
-        kNameout = arg1(0, kNamein.Last('.'));
+        kNamein  = arg0;
+        kNameout = arg1.IsNull() ? arg0(0, arg0.Last('.')) : arg1(0, arg1.Last('.'));
+
         if (!kNameout.EndsWith(".root"))
             kNameout += ".root";
