Improve logic for module audit