added ability to maintain the folder structure