A system comprising an extracorporeal blood treatment system that comprises: a filtration unit comprising a primary chamber and a secondary chamber separated by a semi-permeable membrane; a blood withdrawal line connected to an inlet of the primary chamber, and a blood return line connected to an outlet of the primary chamber, the blood withdrawal line and the blood return line being configured for connection to a patient cardiovascular system; a blood pump configured to control the flow of blood through the primary chamber; an effluent fluid line connected to an outlet of the secondary chamber, wherein the effluent line removes effluent liquid from the secondary chamber, and wherein said system further comprises: an optical source (142, 242) configured to emit light along an optical path; an optical detector (144, 244) configured to receive the light emitted by the optical source (142, 242); a tube retainer configured to retain a tube such that the optical path passes through a liquid passing through a tube positioned in the tube retainer; and a controller operably connected to the optical detector (144, 244), the controller configured to: receive a flow rate signal representative of a flow rate of liquid passing through a tube in the tube retainer; receive a detection signal from the optical detector (144, 244), the detection signal representative of an amount of blood in liquid passing through the tube in the tube retainer; determine if the liquid passing through the tube in the tube retainer contains more than a threshold amount of blood based at least in part on the flow rate signal and the detection signal, wherein the effluent line comprises the tube positioned in the tube retainer such that the controller is configured to determine if the effluent liquid removed from the secondary chamber contains more than the threshold amount of blood, and identify the existence of a blood leak when the liquid passing through the tube in the tube retainer contains more than the threshold amount of blood, characterized by the fact that the threshold amount of blood in the liquid being monitored that is used to identify the existence of a blood leak is different based on the flow rate of the liquid in which blood is being detected and wherein the threshold amount comprises a first value when the flow rate is below a selected flow rate and wherein the threshold amount comprises a second value when the flow rate is above the selected flow rate. a filtration unit comprising a primary chamber and a secondary chamber separated by a semi-permeable membrane; a blood withdrawal line connected to an inlet of the primary chamber, and a blood return line connected to an outlet of the primary chamber, the blood withdrawal line and the blood return line being configured for connection to a patient cardiovascular system; a blood pump configured to control the flow of blood through the primary chamber; an effluent fluid line connected to an outlet of the secondary chamber, wherein the effluent line removes effluent liquid from the secondary chamber, an optical source (142, 242) configured to emit light along an optical path; an optical detector (144, 244) configured to receive the light emitted by the optical source (142, 242); a tube retainer configured to retain a tube such that the optical path passes through a liquid passing through a tube positioned in the tube retainer; and a controller operably connected to the optical detector (144, 244), the controller configured to: receive a flow rate signal representative of a flow rate of liquid passing through a tube in the tube retainer; receive a detection signal from the optical detector (144, 244), the detection signal representative of an amount of blood in liquid passing through the tube in the tube retainer; determine if the liquid passing through the tube in the tube retainer contains more than a threshold amount of blood based at least in part on the flow rate signal and the detection signal, wherein the effluent line comprises the tube positioned in the tube retainer such that the controller is configured to determine if the effluent liquid removed from the secondary chamber contains more than the threshold amount of blood, and identify the existence of a blood leak when the liquid passing through the tube in the tube retainer contains more than the threshold amount of blood, receive a flow rate signal representative of a flow rate of liquid passing through a tube in the tube retainer; receive a detection signal from the optical detector (144, 244), the detection signal representative of an amount of blood in liquid passing through the tube in the tube retainer; determine if the liquid passing through the tube in the tube retainer contains more than a threshold amount of blood based at least in part on the flow rate signal and the detection signal, wherein the effluent line comprises the tube positioned in the tube retainer such that the controller is configured to determine if the effluent liquid removed from the secondary chamber contains more than the threshold amount of blood, and identify the existence of a blood leak when the liquid passing through the tube in the tube retainer contains more than the threshold amount of blood, characterized by the fact that the threshold amount of blood in the liquid being monitored that is used to identify the existence of a blood leak is different based on the flow rate of the liquid in which blood is being detected and wherein the threshold amount comprises a first value when the flow rate is below a selected flow rate and wherein the threshold amount comprises a second value when the flow rate is above the selected flow rate.