Mechanism of the abnormal reaction of thionyl chloride with carboxylic acids