put a lock on the final file to compute