Optimized ModelToFileTransformer