add some checks, use SkinError exception instead of string