Preheat the oven to 200°C, gas mark 6. Place the butter for the pastry in the freezer while you prepare the leeks.
Heat the oil and butter for the filling in a heavy-based saucepan or large frying pan and gently cook the bacon until golden, for about 5-6 minutes. Stir in the onion and leeks and cook over a very gentle heat for 10 minutes, until wilted and tender. Remove from the heat and leave to cool.
Place the flour in a mixing bowl and add a pinch of salt. Take the frozen butter and, using the coarse side of the grater, grate it straight into the flour. Working quickly, sprinkle with 2-3 tbsp of ice cold water and mix with a round-bladed knife to make a dough.
Place the leeks in a 1.5-litre pie dish and sprinkle over the cheese. Roll out the pastry to just larger than the dish and place the pastry over the top of the filling. Crimp the edges and trim away any excess pastry. Brush the top with the egg and bake for 30-35 minutes until the pastry is golden. Serve with creamy mash.