todos
reset state to UNITIdle if write to tag fails
housekeeping