Maybe $file[0] should be better here.