It is not "file" but URI. file "a b.png" corresponds to URI "a%20b.png", they are different things. Naming uri as "file" really confused me.