diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 85593d457f..be220dfa2e 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -396,13 +396,17 @@ int main(int argc, char *argv[]) problemFaces.append(faceI); } } - OFstream str("badFaces"); - Info<< "Dumping bad quality faces to " << str.name() << endl - << "Paste this into the input for surfaceSubset" << nl - << nl << endl; + if (!problemFaces.empty()) + { + OFstream str("badFaces"); - str << problemFaces; + Info<< "Dumping bad quality faces to " << str.name() << endl + << "Paste this into the input for surfaceSubset" << nl + << nl << endl; + + str << problemFaces; + } } }