Improved io error checking
Added writeable element/attribute selectors