Many flies from a several families breed in various forms of dead wood. These microhabitats can range from the rotting sap under the bark of a felled tree, through rot holes in the trunk and larger branches or rot holes in the roots accessible at the base of a tree, to dead wood lying in streams or wet places. Added to this are the fungi that grow in these situations that provide habitat for other species. When a mature wood is clear-felled there can be a break in the continuity of these habitats. In natural woodland there is a range of tree ages from saplings to over-mature and dead trees. Many of our rarest flies are dependent on dead wood and, as most only have a short life-cycle, a population can be lost when woodland is cleared. Re-planting does not help as it will take maybe 50 plus years to start to develop the next population of dead wood, long after the dependent species have died out. Where new woods are established near ancient woodland, some people are trying to artificially create dead wood habitats through a variety of means. Some techniques are illustrated on the website of the Vetree project:
See the link to training materials and look for the video on creating decaying wood habitats. It might be possible to emulate some of these techniques in the garden.
On the subject of dead wood, this year has thrown up some interesting records from felled poplar. During a Northants Diptera Group meeting at Pitsford Nature Reserve, Kev Rowley swept Solva marginata (the Drab Wood-soldierfly) from near a felled poplar. This wood-soldierfly has been rarely reported in Northants, except in the far North-east of the county. Its larvae develop in the rotting sap of poplars that have been felled for about 1-2 years. This record shows that it is more widely spread in Northants than appears to be the case from the NBN Gateway https://data.nbn.org.uk/Taxa/NBNSYS0000007844/Grid_Map
Encouraged by Kev's find I investigated a poplar log pile in Sulby. I could not find any wood-soldierflies but did sweep a number of flies from the surrounding vegetation. When I got round to examining my catch I found the lance fly Lonchaea hackmanni and the short-palped cranefly Gnophomyia viridipennis. Both of these species are associated with poplar and may be new to the current Northants county. (Vice-county 32 includes the former Northants area of the Soke of Peterborough).