Add or remove filename from database when watchdog detects file change.