Updated execute function to respond with the shell output