support execSync and improve test case