Line two baking sheets with foil and place a wire rack on top.
Spray the rack with non-stick spray.
Open one sheet of puff pastry on a cutting board.
Brush the surface lightly with some of the beaten egg.
Sprinkle with your desired amount of cayenne pepper to taste.
Sprinkle surface with ½ cup of cheese to evenly cover entire surface.
Dust a rolling pin with flour and then roll the rolling pin over the cheese to gently press the cheese into the puff pastry.
Cut the puff pastry into long ½-inch wide strips and then fold in half and then pinch the ends together.
Twist each strip several times.
Take a piece of bacon and wrap it around the twisted pastry.
Place on the rack.
Repeat with the remaining twists until everything has been used.
Mix the brown sugar, minced rosemary, salt and pepper in a pie plate.
Carefully take each bacon wrapped pastry one at a time and dip it through the brown sugar mixture - coat completely.
Place each coated twist back on the rack.
Bake the twists for 35-40 minutes. Check them at 30 minutes to make sure they aren't burning. Once the bacon is cooked and the twists are browned, remove from the oven and allow to cool 5 minutes.
Use a thin spatula to carefully lift the twists off the rack so they don't stick.
Allow them to cool another 10 minutes to firm and crisp up before serving.