Use Alex's upgraded version of subprocess with some changes