fix bug with -g option so that when no arg is passed it generates next g...

...reatest problem file