better error message when debug is disabled