Save data to same files from independent, parallel processes

Yes it is not safe for multiple processes to append to the same file at the same time using the regular open function with the "a" flag. I think the most cross platform thing to do is have each process write to its own file, and then combine the results at the end. There are also libraries like SQLight.jl you can try, but if your cluster is using a network filesystem SQLight might be subtly broken. Ref: Atomic Commit In SQLite