Added ability to capture failure of test_*.m files with option of throwing the error