Fixed a socket close error.
Fixed a file close error.