update export helper function with allow rasterization optional param.