fixed overwriting ifplugd
refined testing rules