better execution of external app errors
removed old code