Print diagnostic error message on failure