public static function copyFiles(array $paths): void
    {
        foreach ($paths as $source => $target) {
            // handle file target as array [path, overwrite]
            $target = (array) $target;
            echo "Copying file $source to $target[0] - ";
            if (! is_file($source)) {
                echo "source file not found.\n";

                continue;
            }
            if (is_file($target[0]) && empty($target[1])) {
                echo "target file exists - skip.\n";

                continue;
            } elseif (is_file($target[0]) && ! empty($target[1])) {
                echo 'target file exists - overwrite - ';
            }

            try {
                if (! is_dir(dirname($target[0]))) {
                    mkdir(dirname($target[0]), 0777, true);
                }
                if (copy($source, $target[0])) {
                    echo "done.\n";
                }
            } catch (\Exception $e) {
                echo $e->getMessage() . "\n";
            }
        }
    }