Added output directory auto-creation