added checking root privileges