Sealing the fireplace and chimney will trap the air in the flue. Warm air from the fireplace and the cold air from the chimney will condense the trapped air and turn it into moisture until it becomes droplets of water. To avoid moisture forming in the chimney flue, make sure to keep the chimney cap open when you seal your fireplace. That way the chimney flue will have enough ventilation and any moisture can dry up in itself.