Index: trunk/ippScripts/scripts/phase0_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/phase0_imfile.pl	(revision 9491)
+++ trunk/ippScripts/scripts/phase0_imfile.pl	(revision 9492)
@@ -10,4 +10,5 @@
 use PS::IPP::Metadata::Config;
 use PS::IPP::Metadata::Stats;
+use Storabe qw( freeze thaw );
 use Data::Dumper;
 
@@ -124,5 +125,9 @@
 # Pau.
 
-END { system("sync") == 0 or die "failed to execute sync: $!" }
+END {
+    my $exit = $?;
+    system("sync") == 0 or die "failed to execute sync: $!";
+    $? = $exit;
+}
 
 __END__
