If you suspect or know you have mold, then our procedure for carpet removal is to contain that room with sealed plastic, remove carpet in sections and bag in plastic, seal and bag a second time (called double bagging) and seal before removing from room.  This keeps any mold or mycotoxins from spreading throughout home as you remove. Better yet, if you have a window in that area to remove carpet out that window. The containment will keep dust, mold and mycotoxins contained to that area.  Once carpet, pad, tact strip are removed then we would recommend HEPA vacuum and treating that area with MoldStain T-Klear both by spraying the surface and fogging the air to destroy floating mold spores.  We would also recommend wiping the walls, any shelves and window treatments.  Fogging should be no less that 20 minutes or more. Once complete then you can take containment down and install new flooring.  Remember the HEPA vacuum will need to be taken outside and cleaned with MoldKlear inside and out to remove the potential for cross contamination at next use.