added flag for root filepath