some calloc issues in truncate log