Index: trunk/ppStack/src/ppStackCombineFinal.c
===================================================================
--- trunk/ppStack/src/ppStackCombineFinal.c	(revision 26184)
+++ trunk/ppStack/src/ppStackCombineFinal.c	(revision 27004)
@@ -31,5 +31,5 @@
         if (!status) {
             // Something went wrong
-            psError(PS_ERR_UNKNOWN, false, "Unable to read chunk %d", numChunk);
+            psError(psErrorCodeLast(), false, "Unable to read chunk %d", numChunk);
             return false;
         }
@@ -55,5 +55,5 @@
 
     if (!psThreadPoolWait(true)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to do final combination.");
+        psError(psErrorCodeLast(), false, "Unable to do final combination.");
         return false;
     }
@@ -126,5 +126,5 @@
     pmHDU *hdu = pmHDUFromCell(target->parent);
     if (!hdu) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to find HDU for output.");
+        psError(PPSTACK_ERR_PROG, false, "Unable to find HDU for output.");
         return false;
     }
