Added check for empty line