improved error messages of wrapped functions