remove unused groovy code
convert checked exception to runtime exception