Index: trunk/ippScripts/scripts/receive_file.pl
===================================================================
--- trunk/ippScripts/scripts/receive_file.pl	(revision 24205)
+++ trunk/ippScripts/scripts/receive_file.pl	(revision 24207)
@@ -121,4 +121,6 @@
     my $resolved = $ipprc->file_resolve($dirinfo_uri, 'create');
     &my_die( "failed to resolve $dirinfo_uri\n", $file_id, $PS_EXIT_UNKNOWN_ERROR) if !$resolved;
+
+    print "dirinfo resolved is: $resolved\n" if $verbose;
 
     open OUT, ">$resolved" 
@@ -297,5 +299,13 @@
         my $from = "$tempdir/$file"; # Source for file
         my $target = "$target_dir/$file"; # Target destination for file
+
+        $ipprc->file_delete ($target);
+
         my $to = $ipprc->file_create( $target ); # Target for move
+
+        if (!$to) {
+            &my_die( "failed to create: $target\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
+        }
+
         system("mv $from $to") == 0 or &my_die( "Unable to move $file into workdir $workdir: $!\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
     }
@@ -335,5 +345,8 @@
     my $file_id = shift;
 
-    open INFILE, $filename or &my_die( "Can't open $filename\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
+    my $resolved = $ipprc->file_resolve($filename);
+    &my_die("failed to resolve dirinfo file: $filename ", $file_id, $PS_EXIT_UNKNOWN_ERROR) if !$resolved;
+
+    open INFILE, $resolved or &my_die( "Can't open $resolved\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
 
     my @lines = (<INFILE>);
