Better failure logging/checking