automatic detect gs path