Fixed errors in file tree generation