Make the recursive scanning more robust. Need to make it scan the root files first... or speed up the whole process somehow