Implemented fileTree functionality