Optimum nanoporous TiO2 film and its application to dye-sensitized solar cells