locking for file-map