subdirectories must come first