filePath should be optional