added .Last() to properly leave MPI even if code crashes