regenerateToOutputFile