Fixed collapse_logs task, it was creating duplicate entries