update for gsub dir