Add clean failure handling for analyses

Fleshes out the _failure_callback method for an analysis so it shouldn't get stuck when any bit fails.
Can you explain why renaming this file here and at the end? Is kind of hackish and I don't fully understand why it is needed...