refactor logic to determine what is a real menu file