provide better error message output on failure