improving concurrency in files