Added a bit of logic to execute process. Untested.