aio: more typechecks, more aio error handling