Export ios functions
Install error hook
Most checks are optional

moved all check functions to a separate file,
renamed them, wrote macro to allow disabling them,
cleaned up a little.
Also, fixed some minor stuff.
Fix and clean error hook stuff