First of all, make sure you are properly sanitizing all equipment (note: by definition, SANITIZING is killing of microbes in a active state. STERILIZATION is the killing of all microbes in a active or inactive{i.e.-spores.} state. Personally, I sterilize all my equipment-though sterilizing a carboy would prove a bit difficult. Also, REMEMBER that vinegar production is caused by a microbe called Acetobacter. Take it from one who brews hard cider exclusively, and therefore has researched the topic extensively: Acetobacter is an obligate aerobic organism, in other words it cannot survive without oxygen. With that in mind, monitor your carboy-once CO2 production is evident that means saccharomyces has metabolized all the O2 dissolved in the cider and has begun to break down the sugar in order to survive. This means the environment is OFFICIALLY ANAEROBIC. From this point on, resist the urge to expose the cider to room air.
Hope i was able to help,
sincerely-moondawg.