Use subprocess instead of system.