The best method to eliminate other fungi during spawn and substrate production in mushroom cultivation is an integrated approach which makes both the grower and all tools for cultivation fit for the exercise. The grower should be equipped with clean Personal Protective Equipment and the inoculation room, other tools and all substrates should be well sterilized even if that has to be done twice.
For spawn production always use heat sterilization. You can read a lot of literature about it. For substrates production for mushroom cultivation it depends on the mushroom species and the features of the substrate.
I agree with other colleagues. Various treatments are used for the preparation of substrate for mushroom cultivation to eliminate competitive fungi. They are e.g. steam sterilization, steam pasteurization, hot water immersion and chemical treatment. You can read attached article and document.
Cultivation mushroom in developing countries is usually basing on the natural condition with simple mushroom houses, cheap materials and simple equipment's, three are so many factors leading to the contamination. For a few examples: the plastic bags have small hole by the mistake of producer; by the crawling of mice, by the sharp piece of sawdust, the mistake of workers... Or the ventilation in the incubating room is not good, too high humidity is also to be one of the big reason of contamination.... I think... thousand of reasons who may give the advice without detail information of his technology!?