file read and write seems to be synchronized