functionalized createFileMenu