Use IOUtils to read text files.

Use IOUtils to read text files instead of user method.