move the parsing of the groovy script into the try/catch that prints exceptions to listener