do_generic_file_read/write