stop leaking file descriptors