Index: trunk/ippScripts/scripts/fake_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/fake_imfile.pl	(revision 18020)
+++ trunk/ippScripts/scripts/fake_imfile.pl	(revision 18562)
@@ -42,19 +42,20 @@
 # Parse the command-line arguments
 my ( $exp_id, $fake_id, $class_id, $chiproot, $camroot, $camera, $outroot, 
-     $dbname, $reduction, $verbose, $no_update, $no_op );
+     $dbname, $reduction, $verbose, $no_update, $no_op, $redirect  );
 GetOptions(
-	   'exp_id=s'      => \$exp_id,    # Exposure identifier
-	   'fake_id=s'     => \$fake_id,   # Chiptool identifier
-	   'class_id=s'    => \$class_id,  # Class identifier
-	   'chiproot=s'    => \$chiproot,  # Input Chip files (root)
-	   'camroot=s'     => \$camroot,   # Input Camera files (root)
-	   'camera|c=s'    => \$camera,	   # Camera
-	   'outroot|w=s'   => \$outroot,   # output file base name
-	   'dbname|d=s'    => \$dbname,    # Database name
-	   'reduction=s'   => \$reduction, # Reduction class
-	   'verbose'       => \$verbose,   # Print to stdout
-	   'no-update'     => \$no_update, # Don't update the database?
-	   'no-op'         => \$no_op,	   # Don't do any operations?
-	   ) or pod2usage( 2 );
+    'exp_id=s'      	=> \$exp_id,    # Exposure identifier
+    'fake_id=s'     	=> \$fake_id,   # Chiptool identifier
+    'class_id=s'    	=> \$class_id,  # Class identifier
+    'chiproot=s'    	=> \$chiproot,  # Input Chip files (root)
+    'camroot=s'     	=> \$camroot,   # Input Camera files (root)
+    'camera|c=s'    	=> \$camera,	   # Camera
+    'outroot|w=s'   	=> \$outroot,   # output file base name
+    'dbname|d=s'    	=> \$dbname,    # Database name
+    'reduction=s'   	=> \$reduction, # Reduction class
+    'verbose'       	=> \$verbose,   # Print to stdout
+    'no-update'     	=> \$no_update, # Don't update the database?
+    'no-op'         	=> \$no_op,	   # Don't do any operations?
+    'redirect-output'   => \$redirect,
+    ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
@@ -71,4 +72,8 @@
 $ipprc->define_camera($camera);
 
+my $logDest = $ipprc->filename("LOG.IMFILE", $outroot, $class_id)  or &my_die("Missing entry from camera config", $exp_id, $fake_id, $class_id, $PS_EXIT_CONFIG_ERROR);
+
+$ipprc->redirect_output($logDest) if $redirect;
+
 # Recipes to use based on reduction class
 $reduction = 'DEFAULT' unless defined $reduction;
@@ -116,5 +121,4 @@
 my $cameraObjects = $ipprc->filename("PSASTRO.OUTPUT",      $camroot)             or &my_die("Missing entry from camera config", $exp_id, $fake_id, $class_id, $PS_EXIT_CONFIG_ERROR);
 my $traceDest     = $ipprc->filename("TRACE.IMFILE", 	    $outroot, $class_id)  or &my_die("Missing entry from camera config", $exp_id, $fake_id, $class_id, $PS_EXIT_CONFIG_ERROR);
-my $logDest       = $ipprc->filename("LOG.IMFILE", 	    $outroot, $class_id)  or &my_die("Missing entry from camera config", $exp_id, $fake_id, $class_id, $PS_EXIT_CONFIG_ERROR);
 
 # XXX check for existence of input data
