Index: trunk/FACT++/src/fixfits.cc
===================================================================
--- trunk/FACT++/src/fixfits.cc	(revision 20036)
+++ trunk/FACT++/src/fixfits.cc	(revision 20037)
@@ -41,10 +41,10 @@
     str.str("");
 
-    str << setfill(' ') << left;
-    str << setw(8) << keyword;
+    str << setfill(' ');
+    str << left << setw(8) << keyword;
 
     str << "= ";
 
-    str << setw(20) << value << " / " << comment;
+    str << right << setw(20) << value << " / " << comment;
 
     str << setw(80-str.str().size()) << ' ';
@@ -86,4 +86,8 @@
         "fixfits - Fix the header of a none closed raw-data file\n"
         "\n"
+        "The goal of this tool is to touch the data as less as possible. "
+        "This, however, might result in a few more bytes being lost than "
+        "strictly necessary.\n"
+        "\n"
         "Usage: fixfits input-file-name [output-file-name]\n"
         "\n"
@@ -95,6 +99,4 @@
 int main(int argc, const char* argv[])
 {
-    Time start;
-
     Configuration conf(argv[0]);
     conf.SetPrintUsage(PrintUsage);
@@ -114,4 +116,6 @@
     cout << "\nReading: " << input_name << endl;
 
+    Time start_read;
+
     ifstream input(input_name.c_str(), ios_base::binary);
     if (!input)
@@ -140,5 +144,5 @@
         if (input.eof())
         {
-            cout << "Reached end-of-file but could not find start of data table." << endl;
+            cerr << "Reached end-of-file but could not find start of data table." << endl;
             return 2;
         }
@@ -161,5 +165,5 @@
         if (input.eof())
         {
-            cout << "\nData table header was not closed properly. Aborting." << endl;
+            cerr << "Data table header was not closed properly. Aborting." << endl;
             return 3;
         }
@@ -207,5 +211,5 @@
 
     input.seekg(num_bytes-4);
-    cout << "\nFound start of first compressed tile," << endl;
+    cout << "\nFound start of first compressed tile." << endl;
 
     // ------------------------------------------------------------
@@ -238,5 +242,5 @@
         if (input.eof())
         {
-            cout << "First tile seems broken unable to recover anything." << endl;
+            cerr << "First tile seems broken unable to recover anything." << endl;
             return 4;
         }
@@ -245,5 +249,5 @@
     if (size_t(input.tellg()) != byte_where_tile_start+tile_head.size)
     {
-        cout << "Discrepancy between tile size and sum of blocks size." << endl;
+        cerr << "Discrepancy between tile size and sum of blocks size." << endl;
         return 1;
     }
@@ -321,4 +325,15 @@
     output_heap_end = previous_heap_end;
 
+    cout << "Recovery finished!\n";
+
+    const auto time_read = Time().UnixTime()-start_read.UnixTime();
+
+    // ============================================================
+    //Now we have everything that we need. Go again through the input file and write the output, fixed file
+
+    cout << "\nWriting: " << output_name << endl;
+
+    Time start_write;
+
     const uint64_t num_cols = num_blocks+1;//+1 because of not-used drs-time-marker column
     const uint64_t output_catalog_end = output_catalog_start + num_tiles*num_cols*16;
@@ -327,8 +342,4 @@
     const uint64_t theap    = output_catalog_end - output_catalog_start;
 
-    //Now we have everything that we need. Go again through the input file and write the output, fixed file
-    cout << "Recovery finished!\n\nWriting: " << output_name << endl;
-
-    // ============================================================
 
     if (!dry_run)
@@ -431,4 +442,6 @@
     else
         cout << " ... skipped ...\n";
+
+    const auto time_write = Time().UnixTime()-start_write.UnixTime();
 
     cout << "File recovered!\n";
@@ -452,6 +465,11 @@
         cout << "\nOutput file size : " << setw(12) << fs::file_size(output_name);
         cout << "\nLost bytes       : " << setw(12) << fs::file_size(input_name)-fs::file_size(output_name);
-        cout << "\nLost fraction    : " << setw(12) <<  1.-fs::file_size(output_name)/fs::file_size(input_name);
-    }
+        cout << "\nLost fraction    : " << setw(12) << 1-double(fs::file_size(output_name))/fs::file_size(input_name);
+    }
+    cout << "\n";
+
+    cout << "\nExecution [read]  : " << time_read  << "s, " << fs::file_size(input_name)/1024./1024/time_read << "Mb/s";
+    cout << "\nExecution [write] : " << time_write << "s, " << fs::file_size(output_name)/1024./1024/time_write << "Mb/s";
+
     cout << "\n\nYou should now:\n";
     cout << "- update TSTOPI and TSTOPF using \"fitsdump -c UnixTimeUTC --minmax --nozero\" and then fv\n";
