fixed stale files detection