analysis script now correctly checks for failures