Improved check on file changed/delete