Discharge characterization and its utilization to improve stability by implementing novel EDM variants