move generator creation to separate file

in an attempt to clean up scope of what's going on, move everything
related to creating the file generator to a separate file. Provide
a single entry point to there.

Change-Id: I55e121e3e6e38d9ecc708245f7d6da9c01e812c0