file events listening thread