funProxy is now generated in an external script, because the environment variable might be too long if a complex function is wrapped