Fixed newline issue with the filename and errors line. Reformatted and renamed variables out of habit, no offense meant.