log error CastType