       .then =>
         @_waitForPowerCycle(null, yes)
       .fail (e) =>
-        switch @_getCard().SW
-          when 0x6985
-            l "Failed procces RELOAD BL FROM OS"
-            @_processInitOs()
-            return
-          when 0x6faa then @_failure(Errors.ErrorDueToCardPersonalization)
-          else @_failure(Errors.CommunicationError)
-        @_waitForDisconnectDongle()
+        unless @_handleLoadingScriptError(e)
+          switch @_getCard().SW
+            when 0x6985
+              l "Failed procces RELOAD BL FROM OS"
+              @_processInitOs()
+              return
+            when 0x6faa then @_failure(Errors.ErrorDueToCardPersonalization)
+            else @_failure(Errors.CommunicationError)
+          @_waitForDisconnectDongle()
     .fail (err) ->
       console.error(err)
 

    .then =>
      @_success()
      @_isOsLoaded = no
    .fail =>
      @_failure(Errors.FailedToInitOs)

  _processReloadBootloaderFromOs: ->
    @_removeUserApproval('erasure')

          else
            throw Errors.WrongPinCode
    .fail =>
      @_removeUserApproval('pincode')
      @_failure(Errors.WrongPinCode)
    .done()

