return file as object.
use utf-8 for reading and writing.