#2 : make the mkdir sync just to be safe since the outputs may likely be the same directory