Add watchfiles function