lineinfo is not defined until line 57 (inside of the loop) so this function will make a mess as it is here. Why did you move it?