add after_failure.sh script