Tweaked code to display multilines error message correctly.