added error message formating