This is a working version, which updates a socket (only 1 so far) as soon as a file has been updated