added emit to list of globals in generated files
improved parameters passed to command line