Created helper function to run shell commands and capture the output and return codes