Various flies will lay eggs in nutrient rich/green rich compost piles. The maggots will not hurt the pile, nor you. I recommend withholding water if too wet, fluff up the pile, and cover with a thick layer of straw and brown leaves (6-9 inches). This will suppress the maggots and keep flies from laying more eggs. If you are putting in kitchen waste, be sure to bury toward the center of the pile.