added a check for root privs