fixed exit order and broken matrix file