Preventing contamination of the components of the optical system or obstruction of the light path