refactoring of compiler to allow error reporting, added a call to terminate after jruby script execution