FFT- Based Algorithm Improvements for Detecting Leakage in Pipelines