Index: /branches/pap_mops/ippScripts/scripts/publish_file.pl
===================================================================
--- /branches/pap_mops/ippScripts/scripts/publish_file.pl	(revision 24456)
+++ /branches/pap_mops/ippScripts/scripts/publish_file.pl	(revision 24457)
@@ -70,4 +70,6 @@
     &my_die( "Unable to set up", $pub_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
 
+$ipprc->outroot_prepare( $outroot );
+
 my $mdcParser = PS::IPP::Metadata::Config->new;
 
@@ -123,11 +125,10 @@
 foreach my $comp ( keys %files ) {
     my $file = $ipprc->file_resolve( $files{$comp} ) or
-        &my_die("Unable to resolve file $files{$comp}", $pub_id, $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to resolve file $files{$comp}", $pub_id, $PS_EXIT_SYS_ERROR);
     my_die("Unable to find file $file", $pub_id, $PS_EXIT_PROG_ERROR) unless $ipprc->file_exists( $file );
 
     my $zp = $zp{$comp};
     if ($product eq "IPP-MOPS") {
-        my $out = "$outroot.$comp.fits";
-
+        my $out = $ipprc->file_resolve( "$outroot.$comp.fits" );
         my $command = "$ppMops $file $zp $out";
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -145,5 +146,5 @@
 
 unless ($no_update) {
-    my $command = "$dsreg --add $stage.$stage_id --product $product --type $product --list $listFileName";
+    my $command = "$dsreg --add $stage.$stage_id --copy --abspath --product $product --type $product --list $listFileName";
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
