fixed path issues with recursive calls. and path is now stored relative from the root folder.