debugging sockets, beginning to add sending of each file in directory

changed some files around to maintain functionality