Only use sudo when required