Added lineNumber validity check