Added recovery flashing code