What are you trying to do? Most of the time you can limit the file access to plugin_init() or plugin_cfg() to minimize cpu usage during the game. Then you just access the information in menu_handler().
If you want to do it the way you have posted then just do it. I see no question.