more robust command exec