HAL: Handle hal environment in HalWrapper