add file lock for accession updating and some logging