create output dir and file if not exists