Pressure measurement in pharmaceutical processes to avoid contamination