To prevent the pastry from becoming soggy, make sure the filling isn't too wet, and use a fork to poke a few holes or make small slits on top of each pastry to allow steam to escape during baking.