custom client shutdown logic for named pipes