added extra error message reporting to unit tests