add writing back in
remove redundant file open