Directory stream closed to early