consider adding after_failure key according to some comment by @stof