can read write file via array