in reply to use variable as name for new file

Well, several things stand out.