fixed get filenames..still need to close socket when communication is
complete