Refactor some code.

- Change dns list error message.
- Don't use bounded variable inside closure.
- Continue if error is io.EOF