Improved error messages, fixed a bug

Made generic.cv and genric.bagging work again