support setting directory