Create Leak_detector

Code for averaging and detecting leak.