Refactor generate method and add dry-run support Modified the generate method to return a String instead of printing directly, enabling better output handling. Introduced a dry-run option in the main method to preview generated output without writing to a file.