correct logic to find project base dir