5 level of links, and preparation of output directory