Robust against bad fd