Whenever possible, thoracentesis is done using ultrasonographic guidance, which increases the yield of fluid and decreases risk of complications such as pneumothorax or puncture of an intra-abdominal organ.