several changes to script abort handling and app domain loading code