Be more principled in serializing output dir(s).