bugfix - check that chunks are actually pubkeys
remove console.log