Add achernya's modifications: don't use IOWatcher