Adding checks for sudo