How to break Main Pipe and Sub Pipe