Please move the if for total_size under the log_level one, so that we can combine all that and don't need an elif.