Fixed the blocking of IPv6/AAAA records
Added permission check for creating pid file