Make use of line counter

Please let me show the line number on error message.