Changed the way to get current dir