1. Blitz the flour and butter together in the food processor until there is no visible dry flour remaining. Add the mixture to a bowl, then add 5 tablespoons of cold water. Use your hand to bring the pastry together - if it seems too dry, add the remaining water. Form into a smooth flattened disc, then wrap in cling film and refrigerate for 2 hours or up to overnight.
2. For the filling, melt the butter over a medium heat in a frying pan. Add the onion and cook until starting to gain some colour, around 5 minutes. Add the potatoes and a splash of water, then cover and cook for 8-10 minutes until the potatoes are almost tender. Remove the lid, add the thyme and season well. Remove from the heat and allow to cool.
3. In the same pan (or new one), melt the butter on a medium low heat. Stir in the flour and cook, stirring, for around a minute. Gradually add the milk, stirring continuously and continue to cook until thickened and smooth. Reduce the heat and crumble in the all but a 1/4 of the Castello Creamy Blue. Continue to cook until the cheese has melted and the sauce is smooth and well blended.
4. Add the cooled potato and onion mix to the cheese sauce, mix together and check the seasoning. Allow to cool down in the fridge for a minimum of 20 minutes.
5. When the filling is cool, roll out the pastry to 3mm thick. Cut 10 circles approximately 11cm in diameter for the pie base, and then the same amount of circles for the lids, approximately 9cm in diameter. Keep the lids on a lined tray in the fridge.
6. Take the larger circle and cut a slit from the centre to the edge, then carefully curl and place into the muffin tray hole, gently pushing the pastry to form the base shape with a little coming over the top edge to form a rim.
7. Fill each case with the cooled cheese and potato mixture and top with the remaining Castello Creamy Blue. Lightly brush the edge of the pastry with the beaten egg and place the lid on top sealing the edges together. Use a fork to form a simple pattern around the border. Brush with the egg wash and return to the fridge for 20 minutes to allow the pastry too firm up again.
8. Just before baking, apply another egg wash and cut a small slit in the pastry to allow steam to escape, then bake at 190*C on a baking parchment lined sheet for 25-30 minutes until the pastry is deeply golden