Upgrade mainExec to accept args