Fixed existing file detection