chore, final attempt with after_failure script, use if-then-fi

Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>