Only optimize tables when download was successful.