Added handling to the new open2 process to make sure it terminated