Making pathwatcher module simpler and safer.