3 threads appending to a file