give better error message when failure