I\'m trying to run many calculations at the same time using multiprocessing pool in python. Each time a calculation is done I want to save the result in a file for later use