lock file,read or write