Trying direct line-match to clearly identifies the exact line that reads "Bill to" to avoid false matches.
Next non-empty line: Reliably grabs the immediate next line with actual content as the customer's name.
Filename safety: Removes characters Windows doesn't allow in filenames.
Error and file existence handling: Provides informative messages if conflicts or errors occur.
Use a more flexible format search approach; use regex to match lines containing "Bill to" (allowing extra whitespace). Grab the very next non-empty line. Enhance text search robustness