debug changed from bool to int, so you can set debug level in config