Index: trunk/ippToPsps/perl/ippToPsps/Batch.pm
===================================================================
--- trunk/ippToPsps/perl/ippToPsps/Batch.pm	(revision 29190)
+++ trunk/ippToPsps/perl/ippToPsps/Batch.pm	(revision 29191)
@@ -455,24 +455,27 @@
     # create temporary input file for file list
     my ($resultsFile, $resultsFilePath) = tempfile( "/tmp/ippToPsps_results.XXXX", UNLINK => !$self->{_save_temps});
-# TODO create input file here
+
     # get list of input files
-    my $inputFile = $self->createInputFileList();
-
-    # run IppToPsps program TODO should not need
-    my $success = $self->runProgram($inputFile, $resultsFilePath);
-    if (!$self->{_save_temps}) {unlink $inputFile};
-
-    if ($success) {
-
-        # TODO type-specific processing
-        $self->parseResults($resultsFilePath);
-
-        # tar n' zip
-        if (!$self->{_dontTarball} && $self->createTarball()) {
-
-            # and publish
-            if (defined $self->{_datastore} &&
-                    $self->{_datastore}->register($self->{_name}, $self->{_subDir}, $self->{_filename}, "IPP_PSPS", "tgz")) {
-                $self->{_ippToPspsDb}->setPublished($self->{_batchId}, $self->{_expId}, 1);
+    my ($inputFile, $inputPath) = tempfile( "/tmp/ippToPsps_inputFileList.XXXX", UNLINK => !$self->{_save_temps});
+
+    my $success = 0;
+    if ($self->createInputFileList($inputFile)) {
+
+        # run IppToPsps program TODO should not need
+        $success = $self->runProgram($inputPath, $resultsFilePath);
+
+        if ($success) {
+
+            # TODO type-specific processing
+            $self->parseResults($resultsFilePath);
+
+            # tar n' zip
+            if (!$self->{_dontTarball} && $self->createTarball()) {
+
+                # and publish
+                if (defined $self->{_datastore} &&
+                        $self->{_datastore}->register($self->{_name}, $self->{_subDir}, $self->{_filename}, "IPP_PSPS", "tgz")) {
+                    $self->{_ippToPspsDb}->setPublished($self->{_batchId}, $self->{_expId}, 1);
+                }
             }
         }
@@ -480,5 +483,8 @@
 
     close $resultsFile;
+    close $inputFile;
+
     if (!$self->{_save_temps}) {unlink $resultsFile};
+    if (!$self->{_save_temps}) {unlink $inputFile};
 
     return $success;
Index: trunk/ippToPsps/perl/ippToPsps/DetectionBatch.pm
===================================================================
--- trunk/ippToPsps/perl/ippToPsps/DetectionBatch.pm	(revision 29190)
+++ trunk/ippToPsps/perl/ippToPsps/DetectionBatch.pm	(revision 29191)
@@ -48,5 +48,5 @@
 #######################################################################################
 sub createInputFileList {
-    my ($self) = @_;
+    my ($self, $inputFile) = @_;
 
     my $nebPath = $self->{_gpc1Db}->getCameraStageSmfForThisDvoDb($self->{_dvoDb}, $self->{_expId});
@@ -58,9 +58,7 @@
 
     # now write the path to this file out to temp file
-    my ($tempFile, $tempName) = tempfile( "/tmp/ippToPsps_inputFileList.XXXX", UNLINK => !$self->{_save_temps});
-    print $tempFile $realFile . "\n";
-    close $tempFile;
+    print $inputFile $realFile . "\n";
 
-    return $tempName;
+    return 1;
 }
 
