Log errors instead of raise exceptions for better integration with Scikit-Learn