terminate file descriptors