Include relevant subprocess imports, rename exeception variable