Added security check for root or sudoer