actually check return states when dealing with ndef

there is a very real risk of trying to do a to long write,
that isn't reported before this fix.
relates to #45
when YK_DEBUG is configured, dump all writes