Index: /trunk/ippTools/src/pxdata.c.template
===================================================================
--- /trunk/ippTools/src/pxdata.c.template	(revision 12090)
+++ /trunk/ippTools/src/pxdata.c.template	(revision 12091)
@@ -52,4 +52,8 @@
         psString text = psSlurpFilename(filepath);
         psFree(filepath);
+        if (!text) {
+            psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+            return NULL;
+        }
 
         return text;
@@ -61,20 +65,19 @@
     // see if we have a valid filename
     if (test_f(filepath)) {
-        // if we don't, then we're hosed
-        psError(PS_ERR_IO, true, "can't find a file in search path(s) to match : %s", filename);
+        // if we do, slurp the file
+        psString text = psSlurpFilename(filepath);
         psFree(filepath);
+        if (!text) {
+            psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
+            return NULL;
+        }
 
-        return NULL;
+        return text;
     }
 
-    // slurp the file
-    psString text = psSlurpFilename(filepath);
-    psFree(filepath);
-    if (!text) {
-        psError(PS_ERR_IO, false, "failed to slurp %s", filepath);
-        return NULL;
-    }
+    // couldn't find a matching filename
+    psError(PS_ERR_IO, true, "can't find a file in search path(s) to match : %s", filename);
 
-    return text;
+    return NULL;
 }
 
