When using a Chemically Amplified(CA) resist for the purpose of precise line width and profile control, cleanliness of the environment and the surface of the substrate must be controlled. We have evaluated the cleanliness of substrates, especially the amount of NH 3 and H2O out-gassing, using TDS(Thermal Desorption Spectroscopy) analysis, and tried to clean the substrate by heat pretreatment before resist coating. We found an a-C(amorphous carbon) and TiN(titanium nitride) films among materials popularly used for device manufacturing that were not sufficiently clean for the CA resist, and that heat pretreatment at high temperature was effective for resist pattern profile improvement.