catch agnormal matlab termination