Only sudo when needed