Add file IO for root and conig files