Correlation of the structure with electrical and optical properties of thin tin films