update exit_code