fixed example to create output dir automatically