make sure status is never undefined and log error