Add code to recursively process the main directory.