add final statement to filename variable