functionalized createFileMenu
split out createFileMenu to a new file