Fix system retval checking
Add missing extunit file