What would cause a persistent mildew smell in my bathroom/bedroom, and what can my contractor do about it?

I’ve noticed a persistent mildew smell in my bedroom for the past few months. It’s a very clean mildew smell though (more like a well maintained locker room than a moldy basement). I have an en-suite bathroom and have also noticed small spots of mold starting to form on the ceiling around the shower. I suspect my bathroom fan needs to be replaced, and that steam from the shower is the cause of the smell. The fan sounds like it’s working, but when I put my hands near it, it doesn’t seem to be sucking in air.

Is a poorly functioning fan the likely cause of the smell? If I replace it and clean the mold, will that be sufficient? What else needs to be done, and do I need to bring in a contractor to do it?

Important to note that once the mold has started unless it gets dried out the mold and smell just keep on going. Lot of times its better to tear out the molded area and remove all parts of the ceiling, insulation and wood that is molded. If you let it all dry out that doesn’t mean the mold is gone. Moisture will keep it going. Also on the roof in that bathroom area their is pipe flashing that are over all bathrooms for proper ventilation. We have found in the past that the pipe flashing was leaking because the rubber part of the pipe boot had been deteriorated or rotted away.