Make test shim replacer more error resistant
Use real error messages instead of test name