add close socket after file transfer