Print better error messages if compiled with -DDEBUG