add better error message for failed transformations