Added more generic error messaging handling