Fixing dirPath resolution