Okay, I've tried printing out stack trace in case that transformation fails and got no more info. I also forgot to mention that one of the exception is caused by the line:
So it should be that no error occurs during transformation.
Also, I didn't replace any class. If you read my code, what I've done is method patching (actually just change 1 line of code).
Anyway, thanks for your reply