improve new file detection