Added check for sudo authentication