Added EPIPE handling