Fix calls to subprocess module functions