added more error checking to ipset and modified ipset functions to work with dropping privileges