using fork instead of thread, release usb control after changing the light