implemented close pipe action, close #1902