Added getErrorMesages method