added a error try except in generate-caveman