Robust to stderr closure