fix loadfile so that it doesnt read out of bounds
fix comment typo