Use `io` object to read record.

Closes #301.