fixed logstorage writer preparation logic