Clean shutdown of DirPoll when file processing is in progress