-use blocking wait as the pipe might be faster than the process cleanup