More secure way to run shell commands