Replaced "system" with "subprocess" to enable wait for completion on
supercomputing cluster.