Add support for reading and writing to file