only close open fds, thus avoiding overwriting the errstr, thus giving better messages.