It's very weird but sometimes when using [node:nid] in the file path it doesn't work, even though the settings are exactly the same. If the path is set to "test/[node: nid]", a folder named test will be created in the directory but the file uploaded was just in sites/default/files/.
But sometimes when I add another file filed and do the same setting it works. This really baffles me. Did I miss anything? Any feedback would be highly appreciated.