resource/file: write/read implement.
resource/file: write/read fixes.