added a way to fail the analysis command based on a condition