detect gae dir