Added function that getting raw sql line and counting errors.