Fix file descriptors