put back closing of file descriptors