add file i/o

add file i/o