using poll to fix the bug when file is deleted