Script now checks for right privileges