fix directory outfile