dropped loop pathes and added woring directory discovery and mkdir for stata subdir