More work on the files plugin, and added the beginnings of socket code