Being proactive in detecting harmful substances in alloys