Some code for TCP and listing files