Updated code to create folders based on the random tree generated.