add file reader and writer methods