Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 27718)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 28014)
@@ -76,4 +76,6 @@
     defined $run_state;
 
+my_die ("$run_state is an invalid value for run-state", $exp_id, $chip_id, $class_id, $PS_EXIT_PROG_ERROR) unless ($run_state eq 'new' or $run_state eq 'update');
+
 my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $exp_id, $chip_id, $class_id, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
 
@@ -201,11 +203,22 @@
 
         my $burntoolStateGood;
+        my $burntoolStateGoodUpdate;
         foreach my $camEntry (@$camData) {
             if ($camEntry->{name} eq "BURNTOOL.STATE.GOOD") {
                 $burntoolStateGood = $camEntry->{value};
             }
-        }
-
-        print "burntool state vs burntoolStateGood : $burntoolState vs $burntoolStateGood\n";
+            if ($camEntry->{name} eq "BURNTOOL.STATE.GOOD.UPDATE") {
+                $burntoolStateGoodUpdate = $camEntry->{value};
+            }
+        }
+
+        if ($run_state eq 'new') {
+            print "burntool state vs burntoolStateGood : $burntoolState vs $burntoolStateGood\n";
+        } else {
+            # if doing update go ahead if burntoolState is at least at BURNTOOL.STATE.GOOD.UPDATE
+            print "burntool state vs burntoolStateGoodUpdate : $burntoolState vs $burntoolStateGoodUpdate\n";
+            $useBestBurntool = 0 if (abs($burntoolState) >= $burntoolStateGoodUpdate);
+        }
+
         if (abs($burntoolState) != $burntoolStateGood) {
             if ($useBestBurntool) {
