hsi_customer error checking and logging improved