Is it possible for you to change the filename before writing it?
Can you show your code?