how to prevent your dog from dying