Introduces variables and a file to save the energies