use path instead of filePath