Tidy up error handling and report failure cause in history display