added root privileges check