Structure and photoemission spectroscopy of strain-controlled metal-insulator transition in NdNiO3 thin films