Refactor the TopDirectory variable and the exports
Missed  Replacement