other function used to fetch cur dir path