Index: tools/ddd/Functions.cpp
===================================================================
--- tools/ddd/Functions.cpp	(revision 34)
+++ tools/ddd/Functions.cpp	(revision 38)
@@ -38,7 +38,11 @@
     default: break;
   }
-  if (RD->RHeader->MagicNum != MAGICNUM_FILE_CLOSED)
+  if (RD->RHeader->MagicNum == MAGICNUM_OPEN) {
     QMessageBox::warning(this, "ddd Message","Magic number in run header indicates that the file has not been closed properly.",QMessageBox::Ok);
-
+  }
+  if (RD->RHeader->MagicNum == MAGICNUM_ERROR) {
+    QMessageBox::warning(this, "ddd Message","Magic number in run header indicates that an error occurred while writing the file.",QMessageBox::Ok);
+  }
+  
   rewind(Tmpfile);
   QTextStream in(Tmpfile);
