Added better things

added better light detection logging and IR detection and fail safe