Effect of composition and strain on the electrical properties of LaNiO3 thin films