Added multiprocessing lock