Updating deprecated System.cmd calls