add BAIL_OUT support