Generic reader & writer.

Rename file-specific functions.