Saving state before leaving EBI