Is that because there is an extra 0 in the filename? The two pieces of code generate two different filenames, so if one works and one doesn't it's probably because the one that works is creating the correct filename.