```cpp
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <filesystem>

#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "stb_image_write.h"

class VTF {
public:
    static constexpr int HEADER_SIZE = 64;
    static constexpr double VERSION = 7.2;
    static constexpr int MAX_WIDTH = 4096;
    static constexpr int MAX_HEIGHT = 4096;

    VTF(int width, int height)
        : width(nearest_power_of_two(width)), height(nearest_power_of_two(height)) {
        if (this->width > MAX_WIDTH || this->height > MAX_HEIGHT) {
            throw std::runtime_error("Width or height exceeds maximum limits.");
        }
    }

    void add_image_data(const std::vector<unsigned char>& image_data) {
        data.insert(data.end(), image_data.begin(), image_data.end());
    }

    void save(const std::string& filename) const {
        validate_version();

        int major_version = static_cast<int>(VERSION);
        int minor_version = static_cast<int>((VERSION - major_version) * 10);

        std::ofstream file(filename, std::ios::binary);
        if (!file) {
            throw std::runtime_error("Failed to open file for writing: " + filename);
        }

        file.write("VTF\0", 4);
        file.write(reinterpret_cast<const char*>(&major_version), sizeof(major_version));
        file.write(reinterpret_cast<const char*>(&minor_version), sizeof(minor_version));
        file.write(reinterpret_cast<const char*>(&width), sizeof(width));
        file.write(reinterpret_cast<const char*>(&height), sizeof(height));
        file.write(reinterpret_cast<const char*>(&HEADER_SIZE), sizeof(HEADER_SIZE));
        const size_t padding_size = static_cast<size_t>(HEADER_SIZE) - 20;
        if (padding_size > 0) {
            std::string padding(padding_size, '\0');
            file.write(padding.c_str(), padding.size());
        }

        file.write(reinterpret_cast<const char*>(data.data()), data.size());
        print_file_info(filename);
    }

    static void create_vmt(const std::string& texture_name) {
        std::ofstream file(texture_name + ".vmt");
        if (!file) {
            throw std::runtime_error("Failed to create VMT file: " + texture_name + ".vmt");
        }

        file << R"(
"LightmappedGeneric"
{
    "$basetexture" ")" << texture_name << R"("
    "$surfaceprop" "metal"
    "$reflectivity" "1 1 1"
}
)";
    }

    std::vector<unsigned char> process_image(const std::string& image_path) {
        int img_width, img_height, channels;
        unsigned char* img_data = stbi_load(image_path.c_str(), &img_width, &img_height, &channels, 3);
        if (!img_data) {
            throw std::runtime_error("Failed to load image: " + image_path);
        }

        int new_width = nearest_power_of_two(img_width);
        int new_height = nearest_power_of_two(img_height);
        std::vector<unsigned char> resized_data(new_width * new_height * 3);
        for (int y = 0; y < new_height; ++y) {
            for (int x = 0; x < new_width; ++x) {
                int src_x = (x * img_width) / new_width;
                int src_y = (y * img_height) / new_height;
                if (src_x < img_width && src_y < img_height) {
                    std::copy_n(&img_data[(src_y * img_width + src_x) * channels], channels, &resized_data[(static_cast<std::vector<unsigned char, std::allocator<unsigned char>>::size_type>(y) * new_width + x) * 3]);
                }
            }
        }

        stbi_image_free(img_data);
        return resized_data;
    }

private:
    int width;
    int height;
    std::vector<unsigned char> data;

    static int nearest_power_of_two(int n) {
        if (n < 1) return 1;
        int power = 1;
        while (power < n) {
            power <<= 1;
        }
        return power;
    }

    void validate_version() const {
        if (!(7.0 <= VERSION && VERSION <= 7.5)) {
            throw std::runtime_error("Version must be between 7.0 and 7.5");
        }
    }

    void print_file_info(const std::string& filename) const {
        std::filesystem::path p(filename);
        auto file_size = std::filesystem::file_size(p);
        std::cout << "File '" << filename << "' successfully created." << std::endl;
        std::cout << "File size: " << file_size << " bytes" << std::endl;
        std::cout << "Texture width: " << width << " pixels" << std::endl;
        std::cout << "Texture height: " << height << " pixels" << std::endl;
        std::cout << "Header size: " << HEADER_SIZE << " bytes" << std::endl;
        std::cout << "Version: " << VERSION << std::endl;
    }
};

int main(int argc, char* argv[]) {
    if (argc != 3) {
        std::cerr << "Usage: " << argv[0] << " <image_path> <texture_name>" << std::endl;
        return 1;
    }

    std::string image_path = argv[1];
    std::string texture_name = argv[2];

    if (!std::filesystem::exists(image_path)) {
        std::cerr << "Error: File '" << image_path << "' does not exist." << std::endl;
        return 1;
    }

    try {
        VTF vtf(VTF::MAX_WIDTH, VTF::MAX_HEIGHT);
        auto image_data = vtf.process_image(image_path);
        vtf.add_image_data(image_data);
        vtf.save(texture_name + ".vtf");
        vtf.create_vmt(texture_name);
        std::cout << "Successfully created " << texture_name << ".vtf and " << texture_name << ".vmt" << std::endl;
    }
    catch (const std::exception& e) {
        std::cerr << "An error occurred: " << e.what() << std::endl;
    }

    return 0;
}
```
Оптимизируй код, структурируй код, улучши код, улучши методы и напиши как ее использовать.