add after_failure behavior