I first wipe away all the black gunk (aluminium oxide) with tissues and then use isporopyl alcohol wipes [[NOT methylated spirits]]to clean the threads. You can also use water to clean it.
Also make sure that the alcohol/water dries completely before you use it.
Another possible problem is the tailcap. I don't have any Quarks (yet), but Fenix lights will flicker when the interior screw part of the tailcap is loose.