Fix parse_log_chunk() to handle chunks properly