initialize chunks and add debug output