close file after writtern
close and join process pool