Added path filtering to callback setting.