=Fixed errors causing the code to improperly read through the input files