catch BrokenPipeError