Removed use of subshell to get system command output