Reflection API to work around Rhino's class wrapping.
Removed the console, added error output.