Refactored code in terms of the error messages of SensioLabsInsight