chore(check size before flush)