added most of the file ops, not tested