Extracted set debug led function