refactored logchunks management