change order of failure reason to be more hierarchical
add unit test to history manager