avoid leaking fds