Refactor some code.

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