Better error handling for debug=false