This should be `file.leafName` rather than `file`