Yes this is possible. You would use a Collect Digits step, Keyword Transform Document step, and a Write Document step.
The Keyword Transform is the important one, it works like a template. Most of the file is boilerplate and there is a single variable %var% that you can write the collected value to.
This is not a way to write to a file like a log file would be. You are allowed 1 file per call.
If you are looking to track caller collected digits per call over time, I would suggest using Set Enterprise Call Info step and use one of the Custom Call variables. Then pull them out of the database with a custom report or use the canned CCV report.