Added option for taking selective dirs . added function to process entered directories