fix warning "my" variable $file masks earlier declaration in same scope