Fix output directory issue

I mistake to use file name instead of directory name