Added Dictionary, Fileoutput, intial loop