Fixed pathwatcher initialization

The pathwatcher was not initialized correctly, because of a wrong scope
in the update method.