add more currentLine length condition to avoid unexpected exception