Added sudo check