Hi there Doreen and thanks for allowing me to try to help!
This could be due to a problem that happened before you got this cat. Since you do not know his hsitory, he may have scarred part of his intestinal tract causing this loose stools and odor. There may not be anything you can do since the damage may already have been done. This inappropropriate elimination sounds like he is acting out rather than not being able to make it to his box. I say this because it occured twice. Something in your environment has disturbed him and you may need to work on retraining him.
If this inappropriate elimination happens again, buy a product called Feloway at your local pet store. Follow the directions. It is a feline pheromone that acts as a calming agent and will help deter this behavior.
Here is a website that may give you more tips:
Cat Veterinarian
25 years experience treating cats in my practice