exchange execSync with child_process