Added dynamic handling of dns to plugin