Index: branches/eam_branches/psphot.20100506/src/psphotStackParseCamera.c
===================================================================
--- branches/eam_branches/psphot.20100506/src/psphotStackParseCamera.c	(revision 27883)
+++ branches/eam_branches/psphot.20100506/src/psphotStackParseCamera.c	(revision 27884)
@@ -29,7 +29,7 @@
 
 	// RAW (unconvolved) input data (RAW:IMAGE, RAW:MASK, RAW:VARIANCE, RAW:PSF)
-	psString rawImage = psMetadataLookupStr(NULL, input, "RAW:IMAGE"); // Name of image
+	psString rawImage = psMetadataLookupStr(&status, input, "RAW:IMAGE"); // Name of image
 	if (rawImage && strlen(rawImage) > 0) {
-	    pmFPAfile *rawInputFile = defineFile(config, NULL, "PSPHOT.STACK.INPUT.RAW", rawImage, PM_FPA_FILE_IMAGE); // File for image
+	    rawInputFile = defineFile(config, NULL, "PSPHOT.STACK.INPUT.RAW", rawImage, PM_FPA_FILE_IMAGE); // File for image
 	    if (!rawInputFile) {
 		psError(PS_ERR_UNKNOWN, false, "Unable to define file from image %d (%s)", i, rawImage);
@@ -60,7 +60,7 @@
 
 	// CNV (convolved) input data (CNV:IMAGE, CNV:MASK, CNV:VARIANCE, CNV:PSF)
-	psString cnvImage = psMetadataLookupStr(NULL, input, "CNV:IMAGE"); // Name of image
+	psString cnvImage = psMetadataLookupStr(&status, input, "CNV:IMAGE"); // Name of image
 	if (cnvImage && strlen(cnvImage) > 0) {
-	    pmFPAfile *cnvInputFile = defineFile(config, NULL, "PSPHOT.STACK.INPUT.CNV", cnvImage, PM_FPA_FILE_IMAGE); // File for image
+	    cnvInputFile = defineFile(config, NULL, "PSPHOT.STACK.INPUT.CNV", cnvImage, PM_FPA_FILE_IMAGE); // File for image
 	    if (!cnvInputFile) {
 		psError(PS_ERR_UNKNOWN, false, "Unable to define file from image %d (%s)", i, cnvImage);
@@ -96,7 +96,7 @@
 
 	psString sources = psMetadataLookupStr(&status, input, "SOURCES"); // Name of mask
-	pmFPAfile *srcInputFile = rawInputFile ? rawInputFile : cnvInputFile;
+	// pmFPAfile *srcInputFile = rawInputFile ? rawInputFile : cnvInputFile;
 	if (sources && strlen(sources) > 0) {
-	    if (!defineFile(config, srcInputFile, "PSPHOT.STACK.SOURCES.CNV", sources, PM_FPA_FILE_CMF)) {
+	    if (!defineFile(config, NULL, "PSPHOT.STACK.SOURCES", sources, PM_FPA_FILE_CMF)) {
 		psError(PS_ERR_UNKNOWN, false, "Unable to define file from sources %d (%s)", i, sources);
 		return false;
