Fix debug logger issue, fix bug in decoder, and add support for variable chaos levels