Watching function

This is the function that setup the watching process