all but file read and write works