A skin treatment system comprising a light based skin treatment device (10, 20, 30) is provided. The device (10, 20, 30) comprises a treatment light source (18) for providing a treatment light beam (21) for treating hair or skin tissue, a transparent exit window (14) for allowing the treatment light beam (21) to leave the device (10, 20, 30), and an exit location control unit (17) for controlling a position for the treatment light beam (21) to pass through the exit window (14). The system further comprises a detection light source for providing a detection light beam. The skin treatment system further comprises a detection unit (15) for detecting the detection light beam (21) after having passed at least partially through the exit window (14) at least once, and a control circuit (16) arranged to analyze a detection signal from the detection unit (15) to find damaged areas at an outer surface of the exit window (14), and to control the exit location control unit (17) in order to avoid the treatment light beam (21) to pass through the damaged areas.