Added a program killing feature for MIDAS error checking