change: function findTag has been refactored.
fix: error message should include line number.