handle failure in rake tasks