improve ERRNO recording
bugfix: typo and supply necessary header include
also passes instance pointer for error recording
add runner account lookup