Improved error message parsing. Created Class to store info and display error