Index: trunk/FACT++/src/Fits.cc
===================================================================
--- trunk/FACT++/src/Fits.cc	(revision 12410)
+++ trunk/FACT++/src/Fits.cc	(revision 12413)
@@ -209,5 +209,5 @@
     int append = 0;
     corruptName << fFileName << "corrupt" << append;
-    while (stat(corruptName.str().c_str(), &st))
+    while (!stat(corruptName.str().c_str(), &st))
     {
         append++;
