Modified script to work only if run as root.