In a large mixing bowl, mix the flour and salt together.
Add the beaten egg and mix well.
Gradually add the lukewarm water, mixing until a dough forms. Knead the dough on a lightly floured surface until smooth and elastic.
Divide the dough into two parts. Roll out one part to about 1/8 inch thick. Use a round cookie cutter to cut circles from the dough.
Place a small spoonful of filling (either potato or cheese) in the center of each dough circle. Fold the dough over the filling and press the edges together to seal.
Bring a large pot of salted water to a boil. Drop in the pierogi, a few at a time, and cook for 3-4 minutes or until they float to the top.
Remove the pierogi with a slotted spoon and drain well.
Serve the pierogi hot, topped with melted butter and a side of sour cream.